UNPKG

912 BPlain TextView Raw
1'use strict';
2let userArgs = process.argv.slice(2);
3
4import Program from './lib/commander';
5import Model from './models/index';
6import Commands from './commands';
7
8const path = require('path');
9
10import Common from './models/create/common_model';
11
12new Common().fetchScssFiles('base', (data) => {
13 console.log(data);
14});
15
16
17
18/**
19 * APB CLI Class
20 * @public
21 **/
22export class ApbCli {
23 private _model: Model;
24
25 constructor(
26 public userArgs: any,
27 public commands: any
28 ) {
29 this._model = new Model();
30
31 Commands.fromData({
32 userArgs: userArgs,
33 commands: commands,
34 program: new Program()
35 });
36 }
37
38 /**
39 * Static Function
40 **/
41 static fromData(data: any): ApbCli {
42 return new ApbCli(
43 data.userArgs ? data.userArgs : null,
44 data.commands ? data.commands : null
45 );
46 }
47}
48
49export default ApbCli.fromData({
50 userArgs: userArgs,
51 commands: userArgs[0]
52});