This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/index.js

28 lines
630 B
JavaScript
Raw Normal View History

2019-12-04 14:16:57 +08:00
#!/usr/bin/env node
var program = require('commander');
program
.command('create <name>')
.option('-n, --native', 'Native')
.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)