2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 19:39:07 +00:00
books/cli.js
Faris Ansari ddd9a786d2 Frappe CLI for development
- frappe start command
  - starts frappejs server
  - sets up webpack middleware to bundle files
- introduce frappe.conf.js for configuration
2018-07-29 16:51:03 +05:30

23 lines
576 B
JavaScript
Executable File

#!/usr/bin/env node
const program = require('commander');
const process = require('process');
const package = require('./package.json');
const boilerplate = require('frappejs/model/boilerplate');
program
.version(package.version)
program
.command('start [mode]')
.description('Start development server')
.action(require('./webpack/start'))
program
.command('new-model <name>')
.description('Create a new model in the `models/doctype` folder')
.action((name) => {
boilerplate.make_model_files(name);
});
program.parse(process.argv);