UNPKG

923 BJavaScriptView Raw
1var ae86 = require('./ae86'),
2 bag = require('bagofcli');
3
4function _init() {
5 console.log('Creating example AE86 project');
6 new ae86().init(bag.exit);
7}
8
9function _gen(args) {
10 args = args || {};
11 console.log('Generating website');
12 new ae86({ outDir: args.outDir }).generate(bag.exit);
13}
14
15function _watch(args) {
16 args = args || {};
17 console.log('Watching for changes and automatically regenerating website');
18 new ae86({ outDir: args.outDir }).watch(bag.exit);
19}
20
21function _clean(args) {
22 args = args || {};
23 console.log('Removing website');
24 new ae86({ outDir: args.outDir }).clean(bag.exit);
25}
26
27/**
28 * Execute AE86 CLI.
29 */
30function exec() {
31
32 var actions = {
33 commands: {
34 init: { action: _init },
35 gen: { action: _gen },
36 watch: { action: _watch },
37 drift: { action: _watch },
38 clean: { action: _clean }
39 }
40 };
41
42 bag.command(__dirname, actions);
43}
44
45exports.exec = exec;
\No newline at end of file