2018-01-30 13:25:48 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
const program = require('commander');
|
|
|
|
const process = require('process');
|
2018-07-29 11:21:03 +00:00
|
|
|
const package = require('./package.json');
|
2018-01-31 12:56:21 +00:00
|
|
|
const boilerplate = require('frappejs/model/boilerplate');
|
2018-01-30 13:25:48 +00:00
|
|
|
|
2018-07-29 11:21:03 +00:00
|
|
|
program
|
|
|
|
.version(package.version)
|
|
|
|
|
|
|
|
program
|
|
|
|
.command('start [mode]')
|
|
|
|
.description('Start development server')
|
|
|
|
.action(require('./webpack/start'))
|
|
|
|
|
|
|
|
program
|
|
|
|
.command('new-model <name>')
|
2018-02-21 09:43:21 +00:00
|
|
|
.description('Create a new model in the `models/doctype` folder')
|
|
|
|
.action((name) => {
|
|
|
|
boilerplate.make_model_files(name);
|
|
|
|
});
|
2018-01-30 13:25:48 +00:00
|
|
|
|
|
|
|
program.parse(process.argv);
|