igniteui-cli 14.0.2 → 14.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/execute.js +11 -10
- package/lib/MultiTemplateComponent.js +1 -0
- package/lib/PromptSession.js +36 -11
- package/lib/TemplateManager.js +25 -1
- package/lib/cli.js +83 -92
- package/lib/commands/add.d.ts +2 -8
- package/lib/commands/add.js +8 -6
- package/lib/commands/build.d.ts +2 -9
- package/lib/commands/build.js +44 -9
- package/lib/commands/config.d.ts +2 -8
- package/lib/commands/config.js +34 -28
- package/lib/commands/doc.d.ts +2 -4
- package/lib/commands/doc.js +38 -15
- package/lib/commands/generate.d.ts +2 -8
- package/lib/commands/generate.js +106 -73
- package/lib/commands/index.d.ts +12 -0
- package/lib/commands/index.js +44 -0
- package/lib/commands/list.d.ts +2 -6
- package/lib/commands/list.js +4 -5
- package/lib/commands/new.d.ts +2 -6
- package/lib/commands/new.js +62 -32
- package/lib/commands/quickstart.d.ts +2 -14
- package/lib/commands/quickstart.js +33 -8
- package/lib/commands/start.d.ts +2 -7
- package/lib/commands/start.js +39 -12
- package/lib/commands/test.d.ts +2 -12
- package/lib/commands/test.js +8 -6
- package/lib/commands/types.d.ts +86 -0
- package/lib/commands/types.js +28 -0
- package/lib/commands/upgrade.d.ts +2 -7
- package/lib/commands/upgrade.js +9 -8
- package/lib/project-utility/GridHelper.js +1 -0
- package/lib/templates/AngularTemplate.js +25 -1
- package/lib/templates/IgniteUIForReactTemplate.js +26 -2
- package/lib/templates/IgniteUIForWebComponentsTemplate.js +25 -1
- package/lib/templates/ReactTemplate.js +26 -2
- package/lib/templates/jQueryTemplate.js +26 -2
- package/migrations/update-13_1_0/index.js +2 -1
- package/migrations/update-13_1_0/index.spec.js +27 -4
- package/migrations/update-2/index.js +2 -1
- package/migrations/update-2/index.spec.js +27 -4
- package/migrations/update-3/index.js +2 -1
- package/migrations/update-3/index.spec.js +36 -16
- package/migrations/update-3_2/index.js +2 -1
- package/migrations/update-3_2/index.spec.js +28 -4
- package/migrations/update-4_2_3/index.js +2 -1
- package/migrations/update-4_2_3/index.spec.js +28 -4
- package/migrations/update-5_0_0/index.js +4 -3
- package/migrations/update-5_0_0/index.spec.js +28 -4
- package/migrations/update-5_0_3/index.js +2 -1
- package/migrations/update-5_0_3/index.spec.js +28 -4
- package/package.json +26 -28
- package/scripts/install.js +1 -0
- package/scripts/uninstall.js +1 -0
- package/templates/angular/ig-ts/bar-chart/default/index.js +1 -0
- package/templates/angular/ig-ts/bar-chart/index.js +1 -0
- package/templates/angular/ig-ts/column-chart/default/index.js +1 -0
- package/templates/angular/ig-ts/column-chart/index.js +1 -0
- package/templates/angular/ig-ts/combo/combo/index.js +1 -0
- package/templates/angular/ig-ts/combo/index.js +1 -0
- package/templates/angular/ig-ts/custom-templates/editors-calculation-form/index.js +1 -0
- package/templates/angular/ig-ts/custom-templates/tree-grid-file-explorer/index.js +1 -0
- package/templates/angular/ig-ts/doughnut-chart/default/index.js +1 -0
- package/templates/angular/ig-ts/doughnut-chart/index.js +1 -0
- package/templates/angular/ig-ts/editors/index.js +25 -1
- package/templates/angular/ig-ts/financial-chart/default/index.js +1 -0
- package/templates/angular/ig-ts/financial-chart/index.js +1 -0
- package/templates/angular/ig-ts/funnel-chart/default/index.js +1 -0
- package/templates/angular/ig-ts/funnel-chart/index.js +1 -0
- package/templates/angular/ig-ts/grid/basic/index.js +1 -0
- package/templates/angular/ig-ts/grid/grid-custom/index.js +1 -0
- package/templates/angular/ig-ts/grid/grid-editing/index.js +1 -0
- package/templates/angular/ig-ts/grid/grid-export/index.js +1 -0
- package/templates/angular/ig-ts/grid/grid-templating/index.js +1 -0
- package/templates/angular/ig-ts/grid/index.js +1 -0
- package/templates/angular/ig-ts/hierarchical-grid/hierarchical-grid/index.js +1 -0
- package/templates/angular/ig-ts/hierarchical-grid/hierarchical-grid-custom/index.js +1 -0
- package/templates/angular/ig-ts/hierarchical-grid/hierarchical-grid-editing/index.js +1 -0
- package/templates/angular/ig-ts/hierarchical-grid/hierarchical-grid-export/index.js +1 -0
- package/templates/angular/ig-ts/hierarchical-grid/index.js +1 -0
- package/templates/angular/ig-ts/index.js +1 -0
- package/templates/angular/ig-ts/line-chart/default/index.js +1 -0
- package/templates/angular/ig-ts/line-chart/index.js +1 -0
- package/templates/angular/ig-ts/pie-chart/default/index.js +1 -0
- package/templates/angular/ig-ts/pie-chart/index.js +1 -0
- package/templates/angular/ig-ts/projects/empty/files/package.json +1 -1
- package/templates/angular/ig-ts/projects/empty/index.js +25 -1
- package/templates/angular/ig-ts/radial-chart/default/index.js +1 -0
- package/templates/angular/ig-ts/radial-chart/index.js +1 -0
- package/templates/angular/ig-ts/tree-grid/index.js +1 -0
- package/templates/angular/ig-ts/tree-grid/tree-grid/index.js +1 -0
- package/templates/angular/ig-ts/tree-grid/tree-grid-custom/index.js +1 -0
- package/templates/angular/ig-ts/tree-grid/tree-grid-editing/index.js +1 -0
- package/templates/angular/ig-ts/tree-grid/tree-grid-export/index.js +1 -0
- package/templates/angular/index.js +1 -0
- package/templates/jquery/index.js +1 -0
- package/templates/jquery/js/bar-chart/bar-chart/index.js +1 -0
- package/templates/jquery/js/bar-chart/index.js +1 -0
- package/templates/jquery/js/column-chart/column-chart/index.js +1 -0
- package/templates/jquery/js/column-chart/index.js +1 -0
- package/templates/jquery/js/combo/combo/index.js +1 -0
- package/templates/jquery/js/combo/index.js +1 -0
- package/templates/jquery/js/custom-templates/dashboard-knockout/index.js +1 -0
- package/templates/jquery/js/custom-templates/editors-calculation-form/index.js +1 -0
- package/templates/jquery/js/custom-templates/er-dashboard/index.js +1 -0
- package/templates/jquery/js/custom-templates/file-explorer/index.js +1 -0
- package/templates/jquery/js/doughnut-chart/doughnut-chart/index.js +1 -0
- package/templates/jquery/js/doughnut-chart/index.js +1 -0
- package/templates/jquery/js/editors/index.js +1 -0
- package/templates/jquery/js/financial-chart/financial-chart/index.js +1 -0
- package/templates/jquery/js/financial-chart/index.js +1 -0
- package/templates/jquery/js/funnel-chart/funnel-chart/index.js +1 -0
- package/templates/jquery/js/funnel-chart/index.js +1 -0
- package/templates/jquery/js/grid/grid/index.js +1 -0
- package/templates/jquery/js/grid/grid-custom/index.js +1 -0
- package/templates/jquery/js/grid/grid-editing/index.js +1 -0
- package/templates/jquery/js/grid/grid-export/index.js +1 -0
- package/templates/jquery/js/grid/grid-templating/index.js +1 -0
- package/templates/jquery/js/grid/index.js +1 -0
- package/templates/jquery/js/hierarchical-grid/hierarchical-grid/index.js +1 -0
- package/templates/jquery/js/hierarchical-grid/hierarchical-grid-custom/index.js +1 -0
- package/templates/jquery/js/hierarchical-grid/hierarchical-grid-editing/index.js +1 -0
- package/templates/jquery/js/hierarchical-grid/hierarchical-grid-export/index.js +1 -0
- package/templates/jquery/js/hierarchical-grid/index.js +1 -0
- package/templates/jquery/js/index.js +1 -0
- package/templates/jquery/js/line-chart/index.js +1 -0
- package/templates/jquery/js/line-chart/line-chart/index.js +1 -0
- package/templates/jquery/js/pie-chart/index.js +1 -0
- package/templates/jquery/js/pie-chart/pie-chart/index.js +1 -0
- package/templates/jquery/js/projects/empty/index.js +26 -2
- package/templates/jquery/js/radial-chart/index.js +1 -0
- package/templates/jquery/js/radial-chart/radial-chart/index.js +1 -0
- package/templates/jquery/js/scatter-chart/index.js +1 -0
- package/templates/jquery/js/scatter-chart/scatter-chart/index.js +1 -0
- package/templates/jquery/js/tree-grid/index.js +1 -0
- package/templates/jquery/js/tree-grid/tree-grid/index.js +1 -0
- package/templates/jquery/js/tree-grid/tree-grid-custom/index.js +1 -0
- package/templates/jquery/js/tree-grid/tree-grid-editing/index.js +1 -0
- package/templates/jquery/js/tree-grid/tree-grid-export/index.js +1 -0
- package/templates/quickstart/angular/package.json +1 -1
- package/templates/react/ReactTypeScriptFileUpdate.js +25 -1
- package/templates/react/es6/bar-chart/default/index.js +1 -0
- package/templates/react/es6/bar-chart/index.js +1 -0
- package/templates/react/es6/column-chart/default/index.js +1 -0
- package/templates/react/es6/column-chart/index.js +1 -0
- package/templates/react/es6/combo/combo/index.js +1 -0
- package/templates/react/es6/combo/index.js +1 -0
- package/templates/react/es6/doughnut-chart/doughnut-chart/index.js +1 -0
- package/templates/react/es6/doughnut-chart/index.js +1 -0
- package/templates/react/es6/editors/index.js +25 -1
- package/templates/react/es6/financial-chart/financial-chart/index.js +1 -0
- package/templates/react/es6/financial-chart/index.js +1 -0
- package/templates/react/es6/funnel-chart/funnel-chart/index.js +1 -0
- package/templates/react/es6/funnel-chart/index.js +1 -0
- package/templates/react/es6/grid/basic/index.js +1 -0
- package/templates/react/es6/grid/grid-custom/index.js +1 -0
- package/templates/react/es6/grid/grid-editing/index.js +1 -0
- package/templates/react/es6/grid/grid-export/index.js +1 -0
- package/templates/react/es6/grid/grid-templating/index.js +1 -0
- package/templates/react/es6/grid/index.js +1 -0
- package/templates/react/es6/hierarchical-grid/hierarchical-grid/index.js +1 -0
- package/templates/react/es6/hierarchical-grid/hierarchical-grid-custom/index.js +1 -0
- package/templates/react/es6/hierarchical-grid/hierarchical-grid-editing/index.js +1 -0
- package/templates/react/es6/hierarchical-grid/hierarchical-grid-export/index.js +1 -0
- package/templates/react/es6/hierarchical-grid/index.js +1 -0
- package/templates/react/es6/index.js +1 -0
- package/templates/react/es6/line-chart/default/index.js +1 -0
- package/templates/react/es6/line-chart/index.js +1 -0
- package/templates/react/es6/pie-chart/index.js +1 -0
- package/templates/react/es6/pie-chart/pie-chart/index.js +1 -0
- package/templates/react/es6/projects/empty/index.js +25 -1
- package/templates/react/es6/radial-chart/index.js +1 -0
- package/templates/react/es6/radial-chart/radial-chart/index.js +1 -0
- package/templates/react/es6/scatter-chart/index.js +1 -0
- package/templates/react/es6/scatter-chart/scatter-chart/index.js +1 -0
- package/templates/react/es6/tree-grid/index.js +1 -0
- package/templates/react/es6/tree-grid/tree-grid/index.js +1 -0
- package/templates/react/es6/tree-grid/tree-grid-custom/index.js +1 -0
- package/templates/react/es6/tree-grid/tree-grid-editing/index.js +1 -0
- package/templates/react/es6/tree-grid/tree-grid-export/index.js +1 -0
- package/templates/react/igr-es6/bullet-graph/default/index.js +1 -0
- package/templates/react/igr-es6/bullet-graph/index.js +1 -0
- package/templates/react/igr-es6/category-chart/default/index.js +1 -0
- package/templates/react/igr-es6/category-chart/index.js +1 -0
- package/templates/react/igr-es6/doughnut-chart/default/index.js +1 -0
- package/templates/react/igr-es6/doughnut-chart/index.js +1 -0
- package/templates/react/igr-es6/financial-chart/default/index.js +1 -0
- package/templates/react/igr-es6/financial-chart/index.js +1 -0
- package/templates/react/igr-es6/grid/basic/index.js +1 -0
- package/templates/react/igr-es6/grid/index.js +1 -0
- package/templates/react/igr-es6/index.js +1 -0
- package/templates/react/igr-es6/linear-gauge/default/index.js +1 -0
- package/templates/react/igr-es6/linear-gauge/index.js +1 -0
- package/templates/react/igr-es6/pie-chart/default/index.js +1 -0
- package/templates/react/igr-es6/pie-chart/index.js +1 -0
- package/templates/react/igr-es6/projects/_base/index.js +25 -1
- package/templates/react/igr-es6/projects/top-nav/index.js +25 -1
- package/templates/react/igr-es6/radial-gauge/default/index.js +1 -0
- package/templates/react/igr-es6/radial-gauge/index.js +1 -0
- package/templates/react/igr-ts/bullet-graph/default/index.js +1 -0
- package/templates/react/igr-ts/bullet-graph/index.js +1 -0
- package/templates/react/igr-ts/category-chart/default/index.js +1 -0
- package/templates/react/igr-ts/category-chart/index.js +1 -0
- package/templates/react/igr-ts/doughnut-chart/default/index.js +1 -0
- package/templates/react/igr-ts/doughnut-chart/index.js +1 -0
- package/templates/react/igr-ts/financial-chart/default/index.js +1 -0
- package/templates/react/igr-ts/financial-chart/index.js +1 -0
- package/templates/react/igr-ts/grid/basic/index.js +1 -0
- package/templates/react/igr-ts/grid/index.js +1 -0
- package/templates/react/igr-ts/index.js +1 -0
- package/templates/react/igr-ts/linear-gauge/default/index.js +1 -0
- package/templates/react/igr-ts/linear-gauge/index.js +1 -0
- package/templates/react/igr-ts/pie-chart/default/index.js +1 -0
- package/templates/react/igr-ts/pie-chart/index.js +1 -0
- package/templates/react/igr-ts/projects/_base/files/package.json +1 -1
- package/templates/react/igr-ts/projects/_base/index.js +25 -1
- package/templates/react/igr-ts/projects/_base_with_home/index.js +25 -1
- package/templates/react/igr-ts/projects/base/index.js +25 -1
- package/templates/react/igr-ts/projects/empty/index.js +25 -1
- package/templates/react/igr-ts/projects/top-nav/index.js +25 -1
- package/templates/react/igr-ts/radial-gauge/default/index.js +1 -0
- package/templates/react/igr-ts/radial-gauge/index.js +1 -0
- package/templates/react/index.js +1 -0
- package/templates/react/types/ReactRouteEntry.js +1 -0
- package/templates/react/types/ReactRouteLike.js +1 -0
- package/templates/react/types/ReactRouteTarget.js +1 -0
- package/templates/react/types/index.js +1 -0
- package/templates/webcomponents/WebComponentsTypeScriptFileUpdate.js +25 -1
- package/templates/webcomponents/igc-ts/accordion/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/accordion/index.js +1 -0
- package/templates/webcomponents/igc-ts/avatar/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/avatar/index.js +1 -0
- package/templates/webcomponents/igc-ts/badge/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/badge/index.js +1 -0
- package/templates/webcomponents/igc-ts/banner/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/banner/index.js +1 -0
- package/templates/webcomponents/igc-ts/button/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/button/index.js +1 -0
- package/templates/webcomponents/igc-ts/button-group/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/button-group/index.js +1 -0
- package/templates/webcomponents/igc-ts/calendar/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/calendar/index.js +1 -0
- package/templates/webcomponents/igc-ts/card/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/card/index.js +1 -0
- package/templates/webcomponents/igc-ts/checkbox/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/checkbox/index.js +1 -0
- package/templates/webcomponents/igc-ts/chip/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/chip/index.js +1 -0
- package/templates/webcomponents/igc-ts/circular-progress/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/circular-progress/index.js +1 -0
- package/templates/webcomponents/igc-ts/custom-templates/subscription-form/index.js +1 -0
- package/templates/webcomponents/igc-ts/date-picker/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/date-picker/index.js +1 -0
- package/templates/webcomponents/igc-ts/date-time-input/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/date-time-input/index.js +1 -0
- package/templates/webcomponents/igc-ts/divider/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/divider/index.js +1 -0
- package/templates/webcomponents/igc-ts/dock-manager/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/dock-manager/index.js +1 -0
- package/templates/webcomponents/igc-ts/dropdown/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/dropdown/index.js +1 -0
- package/templates/webcomponents/igc-ts/expansion-panel/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/expansion-panel/index.js +1 -0
- package/templates/webcomponents/igc-ts/financial-chart/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/financial-chart/index.js +1 -0
- package/templates/webcomponents/igc-ts/form/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/form/index.js +1 -0
- package/templates/webcomponents/igc-ts/grid/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/grid/grid-editing/index.js +1 -0
- package/templates/webcomponents/igc-ts/grid/grid-summaries/index.js +1 -0
- package/templates/webcomponents/igc-ts/grid/index.js +1 -0
- package/templates/webcomponents/igc-ts/icon/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/icon/index.js +1 -0
- package/templates/webcomponents/igc-ts/icon-button/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/icon-button/index.js +1 -0
- package/templates/webcomponents/igc-ts/index.js +1 -0
- package/templates/webcomponents/igc-ts/input/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/input/index.js +1 -0
- package/templates/webcomponents/igc-ts/linear-gauge/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/linear-gauge/index.js +1 -0
- package/templates/webcomponents/igc-ts/linear-progress/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/linear-progress/index.js +1 -0
- package/templates/webcomponents/igc-ts/list/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/list/index.js +1 -0
- package/templates/webcomponents/igc-ts/navbar/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/navbar/index.js +1 -0
- package/templates/webcomponents/igc-ts/pie-chart/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/pie-chart/index.js +1 -0
- package/templates/webcomponents/igc-ts/projects/_base/files/package.json +1 -1
- package/templates/webcomponents/igc-ts/projects/_base/files/tsconfig.json +1 -1
- package/templates/webcomponents/igc-ts/projects/_base/index.js +25 -1
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +1 -1
- package/templates/webcomponents/igc-ts/projects/_base_with_home/index.js +25 -1
- package/templates/webcomponents/igc-ts/projects/base/index.js +25 -1
- package/templates/webcomponents/igc-ts/projects/empty/index.js +25 -1
- package/templates/webcomponents/igc-ts/projects/side-nav/index.js +25 -1
- package/templates/webcomponents/igc-ts/radial-gauge/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/radial-gauge/index.js +1 -0
- package/templates/webcomponents/igc-ts/radio-group/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/radio-group/index.js +1 -0
- package/templates/webcomponents/igc-ts/rating/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/rating/index.js +1 -0
- package/templates/webcomponents/igc-ts/ripple/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/ripple/index.js +1 -0
- package/templates/webcomponents/igc-ts/slider/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/slider/index.js +1 -0
- package/templates/webcomponents/igc-ts/switch/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/switch/index.js +1 -0
- package/templates/webcomponents/igc-ts/tabs/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/tabs/index.js +1 -0
- package/templates/webcomponents/igc-ts/text-area/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/text-area/index.js +1 -0
- package/templates/webcomponents/igc-ts/tree/default/index.js +1 -0
- package/templates/webcomponents/igc-ts/tree/index.js +1 -0
- package/templates/webcomponents/index.js +1 -0
package/bin/execute.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const resolve = require("resolve");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const { hideBin } = require("yargs/helpers");
|
|
6
|
+
|
|
7
|
+
const args = hideBin(process.argv);
|
|
7
8
|
|
|
8
9
|
//execute -g igniteui-cli in case there is no project installed, else resolve to the local one
|
|
9
|
-
resolve(
|
|
10
|
-
|
|
10
|
+
resolve("igniteui-cli", { basedir: process.cwd() }, function (err, res) {
|
|
11
|
+
let cli;
|
|
11
12
|
if (res && res.indexOf(process.cwd()) > -1) {
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const localVersion = require(path.join(process.cwd(), "node_modules/igniteui-cli/package.json"))["version"];
|
|
14
|
+
const globalVersion = require(path.join(__dirname, "../package.json"))["version"];
|
|
14
15
|
if (globalVersion !== localVersion) {
|
|
15
16
|
console.log("Different igniteui-cli global and local version");
|
|
16
17
|
}
|
|
@@ -18,5 +19,5 @@ resolve('igniteui-cli', { basedir: process.cwd() }, function (err, res) {
|
|
|
18
19
|
} else {
|
|
19
20
|
cli = require("../lib/cli");
|
|
20
21
|
}
|
|
21
|
-
cli.run();
|
|
22
|
+
cli.run(args);
|
|
22
23
|
});
|
package/lib/PromptSession.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,28 +31,28 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
32
|
});
|
|
10
33
|
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
11
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
38
|
exports.PromptSession = void 0;
|
|
13
39
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const upgrade_1 = require("./commands/upgrade");
|
|
40
|
+
const path = __importStar(require("path"));
|
|
41
|
+
const add_1 = __importDefault(require("./commands/add"));
|
|
42
|
+
const start_1 = __importDefault(require("./commands/start"));
|
|
43
|
+
const upgrade_1 = __importDefault(require("./commands/upgrade"));
|
|
19
44
|
class PromptSession extends cli_core_1.BasePromptSession {
|
|
20
45
|
constructor(templateManager) {
|
|
21
46
|
super(templateManager);
|
|
22
47
|
}
|
|
23
48
|
static chooseTerm() {
|
|
24
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const
|
|
50
|
+
const answer = yield cli_core_1.InquirerWrapper.input({
|
|
26
51
|
default: null,
|
|
27
52
|
message: "Enter a search term",
|
|
28
|
-
name: "term",
|
|
29
|
-
type: "input"
|
|
30
53
|
});
|
|
31
|
-
if (
|
|
32
|
-
return
|
|
54
|
+
if (answer) {
|
|
55
|
+
return answer;
|
|
33
56
|
}
|
|
34
57
|
else {
|
|
35
58
|
const retProm = yield this.chooseTerm();
|
|
@@ -62,6 +85,7 @@ class PromptSession extends cli_core_1.BasePromptSession {
|
|
|
62
85
|
name: "projectName",
|
|
63
86
|
message: "Enter a name for your project:",
|
|
64
87
|
default: cli_core_1.Util.getAvailableName(defaultProjName, true),
|
|
88
|
+
choices: null,
|
|
65
89
|
validate: this.nameIsValid
|
|
66
90
|
});
|
|
67
91
|
const frameRes = yield this.getUserInput({
|
|
@@ -108,7 +132,7 @@ class PromptSession extends cli_core_1.BasePromptSession {
|
|
|
108
132
|
upgradePackages() {
|
|
109
133
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110
134
|
upgrade_1.default.templateManager = this.templateManager;
|
|
111
|
-
yield upgrade_1.default.upgrade({ skipInstall: true });
|
|
135
|
+
yield upgrade_1.default.upgrade({ skipInstall: true, _: ["upgrade"], $0: "upgrade" });
|
|
112
136
|
});
|
|
113
137
|
}
|
|
114
138
|
/**
|
|
@@ -128,3 +152,4 @@ class PromptSession extends cli_core_1.BasePromptSession {
|
|
|
128
152
|
}
|
|
129
153
|
}
|
|
130
154
|
exports.PromptSession = PromptSession;
|
|
155
|
+
//# sourceMappingURL=PromptSession.js.map
|
package/lib/TemplateManager.js
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.TemplateManager = void 0;
|
|
4
27
|
const angular_templates_1 = require("@igniteui/angular-templates");
|
|
5
28
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
6
|
-
const path = require("path");
|
|
29
|
+
const path = __importStar(require("path"));
|
|
7
30
|
const AngularTemplate_1 = require("./templates/AngularTemplate");
|
|
8
31
|
const IgniteUIForWebComponentsTemplate_1 = require("./templates/IgniteUIForWebComponentsTemplate");
|
|
9
32
|
const jQueryTemplate_1 = require("./templates/jQueryTemplate");
|
|
@@ -52,3 +75,4 @@ class TemplateManager extends cli_core_1.BaseTemplateManager {
|
|
|
52
75
|
}
|
|
53
76
|
}
|
|
54
77
|
exports.TemplateManager = TemplateManager;
|
|
78
|
+
//# sourceMappingURL=TemplateManager.js.map
|
package/lib/cli.js
CHANGED
|
@@ -8,21 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.run =
|
|
15
|
+
exports.run = run;
|
|
13
16
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const build_1 = require("./commands/build");
|
|
17
|
-
const config_1 = require("./commands/config");
|
|
18
|
-
const doc_1 = require("./commands/doc");
|
|
19
|
-
const generate_1 = require("./commands/generate");
|
|
20
|
-
const list_1 = require("./commands/list");
|
|
21
|
-
const new_1 = require("./commands/new");
|
|
22
|
-
const quickstart_1 = require("./commands/quickstart");
|
|
23
|
-
const start_1 = require("./commands/start");
|
|
24
|
-
const test_1 = require("./commands/test");
|
|
25
|
-
const upgrade_1 = require("./commands/upgrade");
|
|
17
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
18
|
+
const commands_1 = require("./commands");
|
|
26
19
|
const PromptSession_1 = require("./PromptSession");
|
|
27
20
|
const TemplateManager_1 = require("./TemplateManager");
|
|
28
21
|
process.title = "Ignite UI CLI";
|
|
@@ -34,31 +27,32 @@ function logHelp() {
|
|
|
34
27
|
}
|
|
35
28
|
function run() {
|
|
36
29
|
return __awaiter(this, arguments, void 0, function* (args = null) {
|
|
37
|
-
// we are subscribing on process.exit to catch when help is executed
|
|
38
|
-
process.on("exit", logHelp);
|
|
39
30
|
cli_core_1.App.initialize();
|
|
40
31
|
const templateManager = new TemplateManager_1.TemplateManager();
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const yargsModule = args ?
|
|
50
|
-
|
|
51
|
-
.
|
|
52
|
-
.
|
|
53
|
-
.command(
|
|
54
|
-
.command(
|
|
55
|
-
.command(
|
|
56
|
-
.command(
|
|
57
|
-
.command(
|
|
58
|
-
.command(
|
|
59
|
-
.command(
|
|
60
|
-
.command(
|
|
61
|
-
.command(
|
|
32
|
+
commands_1.newCommand.addChoices(templateManager.getFrameworkIds());
|
|
33
|
+
commands_1.newCommand.templateManager = templateManager;
|
|
34
|
+
commands_1.add.templateManager = templateManager;
|
|
35
|
+
commands_1.build.templateManager = templateManager;
|
|
36
|
+
commands_1.start.templateManager = templateManager;
|
|
37
|
+
commands_1.generate.templateManager = templateManager;
|
|
38
|
+
commands_1.list.templateManager = templateManager;
|
|
39
|
+
commands_1.upgrade.templateManager = templateManager;
|
|
40
|
+
const yargsModule = args ? (0, yargs_1.default)(args) : yargs_1.default;
|
|
41
|
+
yield yargsModule
|
|
42
|
+
.scriptName("") // prevent the addition of the name of the executing script in the usage output
|
|
43
|
+
.usage("") // do not show any usage instructions before the commands list
|
|
44
|
+
.command(commands_1.quickstart)
|
|
45
|
+
.command(commands_1.newCommand)
|
|
46
|
+
.command(commands_1.add)
|
|
47
|
+
.command(commands_1.build)
|
|
48
|
+
.command(commands_1.start)
|
|
49
|
+
.command(commands_1.generate)
|
|
50
|
+
.command(commands_1.config)
|
|
51
|
+
.command(commands_1.doc)
|
|
52
|
+
.command(commands_1.test)
|
|
53
|
+
.command(commands_1.list)
|
|
54
|
+
.command(commands_1.upgrade)
|
|
55
|
+
.version(false) // disable built-in `yargs.version` to override it with our custom option
|
|
62
56
|
.options({
|
|
63
57
|
version: {
|
|
64
58
|
alias: "v",
|
|
@@ -67,67 +61,64 @@ function run() {
|
|
|
67
61
|
type: "boolean"
|
|
68
62
|
}
|
|
69
63
|
})
|
|
64
|
+
.options({
|
|
65
|
+
testMode: {
|
|
66
|
+
default: false,
|
|
67
|
+
type: "boolean",
|
|
68
|
+
hidden: true
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
.middleware((argv) => {
|
|
72
|
+
// invoked after parsing and before the `yargsModule.parseAsync` callback
|
|
73
|
+
const command = argv._[0];
|
|
74
|
+
if (command === commands_1.ADD_COMMAND_NAME && !commands_1.add.check(argv)) {
|
|
75
|
+
argv.skipExecution = true;
|
|
76
|
+
yargsModule.showHelp();
|
|
77
|
+
}
|
|
78
|
+
}, false // setting this to `true` is supposed to exec the middleware after parsing and before arg validation
|
|
79
|
+
// but in reality it also does not trigger the command's handler (╯°□°)╯︵ ┻━┻
|
|
80
|
+
)
|
|
70
81
|
.help().alias("help", "h")
|
|
71
|
-
.argv
|
|
72
|
-
//
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
cli_core_1.App.testMode = !!argv.testMode;
|
|
82
|
-
switch (command) {
|
|
83
|
-
case "new":
|
|
84
|
-
yield new_1.default.execute(argv);
|
|
85
|
-
break;
|
|
86
|
-
case "quickstart":
|
|
87
|
-
yield quickstart_1.default.execute(argv);
|
|
88
|
-
cli_core_1.Util.log("quickstart Created");
|
|
89
|
-
break;
|
|
90
|
-
case "add":
|
|
91
|
-
if (add_1.default.check(argv)) {
|
|
92
|
-
yield add_1.default.execute(argv);
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
yargsModule.showHelp();
|
|
96
|
-
return;
|
|
82
|
+
.parseAsync(args, // the args to parse to argv
|
|
83
|
+
{}, // docs say context to pass in to handlers, but nuh-uh, it's just garbage
|
|
84
|
+
(err, argv, output) => __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
// `argv._` are the positional arguments passed in to the script
|
|
86
|
+
const command = argv._[0];
|
|
87
|
+
if (err) {
|
|
88
|
+
cli_core_1.Util.error(`The ${command} command threw error - ${err.name}`, "red");
|
|
89
|
+
cli_core_1.Util.error(`Message: ${err.message}`, "red");
|
|
90
|
+
if (err.stack) {
|
|
91
|
+
cli_core_1.Util.error(`Stack: ${err.stack}`, "red");
|
|
97
92
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
case "upgrade-packages":
|
|
122
|
-
yield upgrade_1.default.execute(argv);
|
|
123
|
-
break;
|
|
124
|
-
default:
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
const helpRequest = argv.h || argv.help;
|
|
96
|
+
if (helpRequest) {
|
|
97
|
+
logHelp();
|
|
98
|
+
}
|
|
99
|
+
if (command === commands_1.QUICKSTART_COMMAND_NAME && !helpRequest) {
|
|
100
|
+
cli_core_1.Util.log("quickstart Created");
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
// since we are providing a custom callback to `yargsModule.parseAsync`, we need to handle the output as well
|
|
104
|
+
// ref - https://yargs.js.org/docs/#api-reference-parseargs-context-parsecallback
|
|
105
|
+
if (output) {
|
|
106
|
+
cli_core_1.Util.log(output);
|
|
107
|
+
}
|
|
108
|
+
if (argv.version) {
|
|
109
|
+
cli_core_1.Util.showVersion(__dirname + "/../ignite-ui-cli.txt");
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
// internal testing only
|
|
113
|
+
/* istanbul ignore next */
|
|
114
|
+
cli_core_1.App.testMode = !!argv.testMode;
|
|
115
|
+
if (!helpRequest && !commands_1.ALL_COMMANDS.has(command === null || command === void 0 ? void 0 : command.toString())) {
|
|
125
116
|
cli_core_1.Util.log("Starting Step by step mode.", "green");
|
|
126
117
|
cli_core_1.Util.log("For available commands, stop this execution and use --help.", "green");
|
|
127
118
|
const prompts = new PromptSession_1.PromptSession(templateManager);
|
|
128
119
|
prompts.start();
|
|
129
|
-
|
|
130
|
-
}
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
131
122
|
});
|
|
132
123
|
}
|
|
133
|
-
|
|
124
|
+
//# sourceMappingURL=cli.js.map
|
package/lib/commands/add.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare let command: {
|
|
4
|
-
[name: string]: any;
|
|
5
|
-
templateManager: TemplateManager;
|
|
6
|
-
execute: (argv: any) => Promise<void>;
|
|
7
|
-
addTemplate: (name: string, template: Template, options?: AddTemplateArgs) => Promise<boolean>;
|
|
8
|
-
};
|
|
1
|
+
import { AddCommandType } from "./types";
|
|
2
|
+
declare const command: AddCommandType;
|
|
9
3
|
export default command;
|
package/lib/commands/add.js
CHANGED
|
@@ -11,11 +11,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
13
13
|
const PromptSession_1 = require("./../PromptSession");
|
|
14
|
-
|
|
15
|
-
// tslint:disable:object-literal-sort-keys
|
|
16
|
-
command = {
|
|
14
|
+
const command = {
|
|
17
15
|
command: "add [template] [name]",
|
|
18
|
-
|
|
16
|
+
describe: "adds template by its ID",
|
|
19
17
|
templateManager: null,
|
|
20
18
|
builder: {
|
|
21
19
|
"template": {
|
|
@@ -43,14 +41,17 @@ command = {
|
|
|
43
41
|
global: true
|
|
44
42
|
}
|
|
45
43
|
},
|
|
46
|
-
check: argv => {
|
|
44
|
+
check: (argv) => {
|
|
47
45
|
if ((!argv.name && argv.template) || (argv.name && !argv.template)) {
|
|
48
46
|
return false;
|
|
49
47
|
}
|
|
50
48
|
return true;
|
|
51
49
|
},
|
|
52
|
-
|
|
50
|
+
handler(argv) {
|
|
53
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
if (argv.skipExecution) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
54
55
|
cli_core_1.GoogleAnalytics.post({
|
|
55
56
|
t: "screenview",
|
|
56
57
|
cd: "Add"
|
|
@@ -157,3 +158,4 @@ command = {
|
|
|
157
158
|
};
|
|
158
159
|
// hint transpiler it's an ES6 module, exports without import won't do
|
|
159
160
|
exports.default = command;
|
|
161
|
+
//# sourceMappingURL=add.js.map
|
package/lib/commands/build.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare
|
|
3
|
-
command: string;
|
|
4
|
-
desc: string;
|
|
5
|
-
builder: {};
|
|
6
|
-
templateManager: TemplateManager;
|
|
7
|
-
execute: (argv: any) => Promise<void>;
|
|
8
|
-
build: (argv: any) => Promise<void>;
|
|
9
|
-
};
|
|
1
|
+
import { BuildCommandType } from "./types";
|
|
2
|
+
declare const command: BuildCommandType;
|
|
10
3
|
export default command;
|
package/lib/commands/build.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -10,15 +33,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
33
|
};
|
|
11
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
35
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
13
|
-
const fs = require("fs
|
|
14
|
-
const path = require("path");
|
|
15
|
-
|
|
16
|
-
command = {
|
|
36
|
+
const fs = __importStar(require("fs"));
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const command = {
|
|
17
39
|
command: "build",
|
|
18
|
-
|
|
19
|
-
builder: {
|
|
40
|
+
describe: "builds the project",
|
|
41
|
+
builder: (yargs) => {
|
|
42
|
+
return yargs.usage(""); // do not show any usage instructions before the commands
|
|
43
|
+
},
|
|
20
44
|
templateManager: null,
|
|
21
|
-
|
|
45
|
+
handler(argv) {
|
|
22
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
47
|
cli_core_1.GoogleAnalytics.post({
|
|
24
48
|
t: "screenview",
|
|
@@ -27,7 +51,7 @@ command = {
|
|
|
27
51
|
command.build(argv);
|
|
28
52
|
});
|
|
29
53
|
},
|
|
30
|
-
build(
|
|
54
|
+
build() {
|
|
31
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
56
|
cli_core_1.Util.log("Build started.");
|
|
33
57
|
yield cli_core_1.PackageManager.ensureIgniteUISource(true, command.templateManager);
|
|
@@ -52,9 +76,20 @@ command = {
|
|
|
52
76
|
fs.mkdirSync("./themes");
|
|
53
77
|
const source = path.join(config.project.igniteuiSource, "/css/themes/", config.project.theme.split(".")[0]);
|
|
54
78
|
const destination = path.join(config.project.sourceRoot, "themes");
|
|
55
|
-
|
|
79
|
+
cli_core_1.Util.ensureDirectoryExists(destination);
|
|
80
|
+
if (!cli_core_1.Util.isDirectory(source)) {
|
|
81
|
+
fs.copyFileSync(source, destination);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const entries = fs.readdirSync(source, { withFileTypes: true });
|
|
85
|
+
entries.forEach((entry) => {
|
|
86
|
+
const sourcePath = path.join(source, entry.name);
|
|
87
|
+
const destinationPath = path.join(destination, entry.name);
|
|
88
|
+
fs.copyFileSync(sourcePath, destinationPath);
|
|
89
|
+
});
|
|
56
90
|
}
|
|
57
91
|
});
|
|
58
92
|
}
|
|
59
93
|
};
|
|
60
94
|
exports.default = command;
|
|
95
|
+
//# sourceMappingURL=build.js.map
|
package/lib/commands/config.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
desc: string;
|
|
4
|
-
builder: (yargs: any) => void;
|
|
5
|
-
getHandler(argv: any): void;
|
|
6
|
-
setHandler(argv: any): void;
|
|
7
|
-
addHandler(argv: any): void;
|
|
8
|
-
};
|
|
1
|
+
import { ConfigCommandType } from "./types";
|
|
2
|
+
declare const command: ConfigCommandType;
|
|
9
3
|
export default command;
|
package/lib/commands/config.js
CHANGED
|
@@ -2,60 +2,64 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
4
4
|
const command = {
|
|
5
|
-
// tslint:disable:object-literal-sort-keys
|
|
6
5
|
command: "config",
|
|
7
|
-
|
|
8
|
-
builder: yargs => {
|
|
9
|
-
yargs
|
|
6
|
+
describe: "gets, sets or adds a configuration property",
|
|
7
|
+
builder: (yargs) => {
|
|
8
|
+
return yargs
|
|
9
|
+
.command({
|
|
10
10
|
command: "get <property>",
|
|
11
|
-
|
|
12
|
-
builder: {
|
|
13
|
-
property
|
|
11
|
+
describe: "Gets a configuration property",
|
|
12
|
+
builder: (yargs) => {
|
|
13
|
+
return yargs.option("property", {
|
|
14
14
|
describe: "Config property to get",
|
|
15
15
|
type: "string"
|
|
16
|
-
}
|
|
16
|
+
})
|
|
17
|
+
.usage(""); // do not show any usage instructions before the commands list
|
|
17
18
|
},
|
|
18
19
|
handler: command.getHandler
|
|
19
|
-
})
|
|
20
|
+
})
|
|
21
|
+
.command({
|
|
20
22
|
command: "set <property> <value>",
|
|
21
|
-
|
|
22
|
-
builder: {
|
|
23
|
-
property
|
|
23
|
+
describe: "Sets a configuration property",
|
|
24
|
+
builder: (yargs) => {
|
|
25
|
+
return yargs.option("property", {
|
|
24
26
|
describe: "Config property to set",
|
|
25
27
|
type: "string"
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
+
})
|
|
29
|
+
.option("value", {
|
|
28
30
|
describe: "New value for the property",
|
|
29
31
|
type: "string"
|
|
30
|
-
}
|
|
32
|
+
})
|
|
33
|
+
.usage(""); // do not show any usage instructions before the commands list
|
|
31
34
|
},
|
|
32
35
|
handler: command.setHandler
|
|
33
|
-
})
|
|
36
|
+
})
|
|
37
|
+
.command({
|
|
34
38
|
command: "add <property> <value>",
|
|
35
|
-
|
|
36
|
-
builder: {
|
|
37
|
-
property
|
|
39
|
+
describe: "Adds a value to an existing configuration array",
|
|
40
|
+
builder: (yargs) => {
|
|
41
|
+
return yargs.option("property", {
|
|
38
42
|
describe: "Config property to add to",
|
|
39
43
|
type: "string"
|
|
40
|
-
}
|
|
41
|
-
|
|
44
|
+
})
|
|
45
|
+
.option("value", {
|
|
42
46
|
describe: "New value to add",
|
|
43
47
|
type: "string"
|
|
44
|
-
}
|
|
48
|
+
})
|
|
49
|
+
.usage(""); // do not show any usage instructions before the commands list
|
|
45
50
|
},
|
|
46
|
-
handler:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}).option("global", {
|
|
51
|
+
handler: command.addHandler
|
|
52
|
+
})
|
|
53
|
+
.option("global", {
|
|
50
54
|
alias: "g",
|
|
51
55
|
type: "boolean",
|
|
52
56
|
global: true,
|
|
53
57
|
describe: "Specify if the global configuration should be used"
|
|
54
58
|
})
|
|
59
|
+
.usage("") // do not show any usage instructions before the commands list
|
|
55
60
|
// at least one command is required
|
|
56
61
|
.demandCommand(1, "Please select command");
|
|
57
62
|
},
|
|
58
|
-
// tslint:enable:object-literal-sort-keys
|
|
59
63
|
getHandler(argv) {
|
|
60
64
|
cli_core_1.GoogleAnalytics.post({
|
|
61
65
|
t: "screenview",
|
|
@@ -159,6 +163,8 @@ const command = {
|
|
|
159
163
|
});
|
|
160
164
|
}
|
|
161
165
|
cli_core_1.Util.log(`Property "${argv.property}" updated.`);
|
|
162
|
-
}
|
|
166
|
+
},
|
|
167
|
+
handler(_argv) { } // part of the CommandModule interface
|
|
163
168
|
};
|
|
164
169
|
exports.default = command;
|
|
170
|
+
//# sourceMappingURL=config.js.map
|
package/lib/commands/doc.d.ts
CHANGED