2
0
mirror of https://github.com/frappe/books.git synced 2025-01-24 15:48:25 +00:00
books/cli.js

23 lines
576 B
JavaScript
Raw Normal View History

2018-01-30 18:55:48 +05:30
#!/usr/bin/env node
const program = require('commander');
const process = require('process');
const package = require('./package.json');
2018-01-31 18:26:21 +05:30
const boilerplate = require('frappejs/model/boilerplate');
2018-01-30 18:55:48 +05:30
program
.version(package.version)
program
.command('start [mode]')
.description('Start development server')
.action(require('./webpack/start'))
program
.command('new-model <name>')
2018-02-21 15:13:21 +05:30
.description('Create a new model in the `models/doctype` folder')
.action((name) => {
boilerplate.make_model_files(name);
});
2018-01-30 18:55:48 +05:30
program.parse(process.argv);