doric cli

This commit is contained in:
pengfei.zhou
2019-08-03 02:03:56 +08:00
parent 740848e604
commit 99b900f2b6
8 changed files with 2253 additions and 5 deletions

20
doric-cli/index.js Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env node
var program = require('commander');
var program = require('commander');
program
.command('create <name>')
.option('-n, --native', 'Native')
.action(function (name, cmd) {
console.log('create ' + name + (cmd.native ? ' native' : 'js'))
})
program
.command('dev')
.action(function () {
require('./scripts/watcher')
})
program.parse(process.argv)
console.log(process.cwd())