UNPKG

755 BJavaScriptView Raw
1#! /usr/bin/env node
2import commandLineArgs from 'command-line-args';
3import swig from 'swig';
4import path from 'path';
5import TemplateFactory from './TemplateFactory';
6import fs from 'fs';
7import config from './config/config';
8import cliOptions from './config/cli-options'
9import swigFilters from './config/swig-filters';
10const cli = commandLineArgs(cliOptions);
11
12swigFilters(swig);
13const options = cli.parse().options;
14
15/* ===============
16 Ask for help
17 =============== */
18if( options.help ) {
19 console.log(cli.getUsage(cli));
20}
21
22let configData = config.getConfigFile();
23configData.structure.container = options.container ? "container" : configData.structure.container;
24config.updateConfigFile(configData);
25
26
27TemplateFactory.createTemplateFor(options);
\No newline at end of file