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
2020-01-07 14:07:12 +08:00

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)