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/doric-cli/index.js

28 lines
630 B
JavaScript
Raw Normal View History

2019-08-03 02:03:56 +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'))
2019-08-13 11:58:51 +08:00
require('./scripts/init')(name)
2019-08-03 02:03:56 +08:00
})
program
.command('dev')
.action(function () {
require('./scripts/watcher')
})
2019-08-15 10:51:58 +08:00
program
.command('build')
.action(function () {
require('./scripts/command').build()
})
program
.command('clean')
.action(function () {
require('./scripts/command').clean()
})
2019-08-03 02:03:56 +08:00
program.parse(process.argv)