astro-parcel
Version:
Build and optimize your Astro project using Parcel
33 lines • 895 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const options_1 = require("./options");
const lib_1 = require("./lib");
async function main(args) {
const cliOptions = (0, options_1.parseOption)(args);
const command = cliOptions._[2];
if (cliOptions.help) {
return console.log((0, options_1.help)());
}
switch (command) {
case "build": {
await (0, lib_1.build)(cliOptions);
return;
}
case "dev": {
await (0, lib_1.dev)(cliOptions);
return;
}
case "serve":
case "preview": {
await (0, lib_1.serve)(cliOptions);
return;
}
default: {
throw new Error(`Command ${command} is not supported`);
}
}
}
main(process.argv).catch((err) => {
throw err;
});
//# sourceMappingURL=bin.js.map