UNPKG

create-html5-app

Version:

Create a new simple project in HTML5 with one command.

32 lines (28 loc) 1.03 kB
const { build } = require('gluegun') /** * Create the cli and kick it off */ async function run(argv) { // create a CLI runtime const cli = build() .brand('create-html5-app') .src(__dirname) .plugins('./node_modules', { matching: 'create-html5-app-*', hidden: true }) .help({ name: 'help', alias: 'h', hidden: true, dashed: true, run: (toolbox) => toolbox.help(), }) // provides default for help, h, --help, -h .version() // provides default for version, v, --version, -v .create() // enable the following method if you'd like to skip loading one of these core extensions // this can improve performance if they're not necessary for your project: // .exclude(['meta', 'strings', 'print', 'filesystem', 'semver', 'system', 'prompt', 'http', 'template', 'patching', 'package-manager']) // and run it const toolbox = await cli.run(argv) // send it back (for testing, mostly) return toolbox } module.exports = { run }