UNPKG

@kadconsulting/dry

Version:
44 lines (43 loc) 1.6 kB
#!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const superBuild_1 = require('./superBuild.cjs'); const commander_1 = require("commander"); const includeStyles_1 = require('./includeStyles.cjs'); const generateIcon_1 = require('./generateIcon.cjs'); const program = new commander_1.Command(); program .command('init') .description('Initialize a new project structure') .action(() => { (0, superBuild_1.initProject)(); (0, superBuild_1.updateIndices)(); // Update index.ts and types.ts for all components }); program .command('generate [componentNames...]') .alias('g') .option('-s, --skip-story', 'Skip creating a story file') .option('-c, --category <category>', 'Specify the category (parent directory) for the components') .description('Generate new components') .action((componentNames, options) => { componentNames.forEach((componentName) => { (0, superBuild_1.generateComponent)(componentName, options.category, options.skipStory); }); }); program .command('remove [componentNames...]') .description('Remove components') .action((componentNames) => { componentNames.forEach((componentName) => { (0, superBuild_1.removeComponent)(componentName); }); }); program .command('include-styles') .description('Include scss files in the dist folder') .action(() => (0, includeStyles_1.includeStyles)()); program .command('generate-icon') .description('Generate a new icon') .action(generateIcon_1.generateIcon); program.parse(process.argv);