33 lines
781 B
JavaScript
Executable File
33 lines
781 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
var program = require('commander');
|
|
|
|
program
|
|
.command('create <name>')
|
|
.action(function (name, cmd) {
|
|
console.log('create ' + name + (cmd.native ? ' native' : 'js'))
|
|
require('./scripts/init')(name)
|
|
})
|
|
program
|
|
.command('new <name>')
|
|
.action(function (name, cmd) {
|
|
console.log('create ' + name + (cmd.native ? ' native' : 'js'))
|
|
require('./scripts/init')(name)
|
|
})
|
|
program
|
|
.command('dev')
|
|
.action(function () {
|
|
require('./scripts/watcher')
|
|
})
|
|
program
|
|
.command('build')
|
|
.action(function () {
|
|
require('./scripts/command').build()
|
|
})
|
|
program
|
|
.command('clean')
|
|
.action(function () {
|
|
require('./scripts/command').clean()
|
|
})
|
|
program.parse(process.argv)
|