create-sps-project
Version:
CLI tool to create SPS Digital Tech template projects
33 lines (26 loc) • 783 B
JavaScript
const ArgParser = require('./cli/arg-parser');
const ProjectCreator = require('./cli/project-creator');
async function main() {
try {
// Parse command line arguments
const argParser = new ArgParser();
const isValid = argParser.parse(process.argv.slice(2));
if (!isValid) {
process.exit(1);
}
// Get configuration
const config = argParser.getConfig();
// Create the project
const projectCreator = new ProjectCreator(config);
const success = await projectCreator.create();
if (!success) {
process.exit(1);
}
} catch (error) {
console.error(`❌ Unexpected error: ${error.message}`);
process.exit(1);
}
}
// Execute main function
main();