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