igniteui-cli 14.0.1 → 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/lib/commands/doc.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,24 +33,23 @@ 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 opn = require("opn");
|
|
14
36
|
const PromptSession_1 = require("../PromptSession");
|
|
15
|
-
|
|
16
|
-
doc = {
|
|
17
|
-
// tslint:disable:object-literal-sort-keys
|
|
37
|
+
const doc = {
|
|
18
38
|
command: "doc [term]",
|
|
19
|
-
|
|
20
|
-
builder: {
|
|
21
|
-
|
|
39
|
+
describe: "opens the Infragistics search for the given term",
|
|
40
|
+
builder: (yargs) => {
|
|
41
|
+
return yargs
|
|
42
|
+
.option("term", {
|
|
22
43
|
describe: "The term you would like to search for",
|
|
23
44
|
type: "string"
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
template: null,
|
|
27
|
-
open(target) {
|
|
28
|
-
opn(target);
|
|
45
|
+
})
|
|
46
|
+
.usage(""); // do not show any usage instructions before the commands list
|
|
29
47
|
},
|
|
30
|
-
|
|
48
|
+
open: (target) => __awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
+
const open = yield Promise.resolve().then(() => __importStar(require("open")));
|
|
50
|
+
open.default.call(target);
|
|
51
|
+
}),
|
|
52
|
+
handler(argv) {
|
|
31
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
54
|
cli_core_1.GoogleAnalytics.post({
|
|
33
55
|
t: "screenview",
|
|
@@ -36,7 +58,7 @@ doc = {
|
|
|
36
58
|
if (!argv.term) {
|
|
37
59
|
const answer = yield PromptSession_1.PromptSession.chooseTerm();
|
|
38
60
|
argv.term = answer;
|
|
39
|
-
yield this.
|
|
61
|
+
yield this.handler(argv);
|
|
40
62
|
}
|
|
41
63
|
else if (!cli_core_1.Util.isAlphanumericExt(argv.term)) {
|
|
42
64
|
return cli_core_1.Util.error(`The search term '${argv.term}' is not valid.` + "\n" +
|
|
@@ -50,9 +72,10 @@ doc = {
|
|
|
50
72
|
ea: `term to search: ${argv.term}`,
|
|
51
73
|
cd13: argv.term
|
|
52
74
|
});
|
|
53
|
-
doc.open(`https://www.infragistics.com/search?q=${argv.term.trim()}`);
|
|
75
|
+
yield doc.open(`https://www.infragistics.com/search?q=${argv.term.trim()}`);
|
|
54
76
|
}
|
|
55
77
|
});
|
|
56
78
|
}
|
|
57
79
|
};
|
|
58
80
|
exports.default = doc;
|
|
81
|
+
//# sourceMappingURL=doc.js.map
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
command: string;
|
|
4
|
-
desc: string;
|
|
5
|
-
templateManager: any;
|
|
6
|
-
builder: (yargs: any) => void;
|
|
7
|
-
template(argv: any): Promise<void>;
|
|
8
|
-
};
|
|
1
|
+
import { CommandType } from "./types";
|
|
2
|
+
declare const command: CommandType;
|
|
9
3
|
export default command;
|
package/lib/commands/generate.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,14 +31,76 @@ 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
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
13
|
-
const path = require("path");
|
|
14
|
-
const config_1 = require("./config");
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const config_1 = __importDefault(require("./config"));
|
|
41
|
+
function handler(argv) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
cli_core_1.GoogleAnalytics.post({
|
|
44
|
+
t: "screenview",
|
|
45
|
+
cd: "Generate"
|
|
46
|
+
});
|
|
47
|
+
// trim
|
|
48
|
+
argv.name = argv.name.trim();
|
|
49
|
+
// letter+alphanumeric check
|
|
50
|
+
if (!cli_core_1.Util.isAlphanumericExt(argv.name)) {
|
|
51
|
+
cli_core_1.Util.error(`Name '${argv.name}' is not valid. `
|
|
52
|
+
+ "Name should start with a letter and can also contain numbers, dashes and spaces.", "red");
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const outDir = path.join(process.cwd(), argv.name);
|
|
56
|
+
if (cli_core_1.Util.directoryExists(outDir)) {
|
|
57
|
+
cli_core_1.Util.error(`Folder '${argv.name}' already exists!`, "red");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (command.templateManager.getFrameworkById(argv.framework) === undefined) {
|
|
61
|
+
return cli_core_1.Util.error("Framework not supported", "red");
|
|
62
|
+
}
|
|
63
|
+
let projectLib;
|
|
64
|
+
if (argv.type) {
|
|
65
|
+
projectLib = command.templateManager.getProjectLibrary(argv.framework, argv.type);
|
|
66
|
+
if (!projectLib) {
|
|
67
|
+
return cli_core_1.Util.error(`Project type '${argv.type}' not found in framework '${argv.framework}'`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
projectLib = command.templateManager.getProjectLibrary(argv.framework);
|
|
72
|
+
argv.type = projectLib.projectType;
|
|
73
|
+
}
|
|
74
|
+
const res = yield cli_core_1.Util.processTemplates(projectLib.generateTemplateFolderPath, outDir, {
|
|
75
|
+
templateFramework: argv.framework,
|
|
76
|
+
templateName: argv.name,
|
|
77
|
+
templateType: argv.type
|
|
78
|
+
}, {});
|
|
79
|
+
if (!res) {
|
|
80
|
+
return cli_core_1.Util.error("Template generation failed!", "red");
|
|
81
|
+
}
|
|
82
|
+
if (!argv.skipConfig) {
|
|
83
|
+
config_1.default.addHandler({ property: "customTemplates", value: "path:" + outDir, global: true, skipAnalytics: true, _: ["config"], $0: "config" });
|
|
84
|
+
}
|
|
85
|
+
cli_core_1.GoogleAnalytics.post({
|
|
86
|
+
t: "event",
|
|
87
|
+
ec: "$ig generate",
|
|
88
|
+
el: "subcommand: template",
|
|
89
|
+
ea: `template name: ${argv.name}; framework: ${argv.framework};` +
|
|
90
|
+
`project type: ${argv.type}; skip-config: ${argv.skipConfig}`,
|
|
91
|
+
cd1: argv.framework,
|
|
92
|
+
cd2: argv.type,
|
|
93
|
+
cd7: argv.name,
|
|
94
|
+
cd9: "template",
|
|
95
|
+
cd10: !!argv.skipConfig
|
|
96
|
+
});
|
|
97
|
+
cli_core_1.Util.log("Template generated successfully");
|
|
98
|
+
});
|
|
99
|
+
}
|
|
15
100
|
const command = {
|
|
16
101
|
aliases: ["g"],
|
|
17
102
|
command: "generate",
|
|
18
|
-
|
|
103
|
+
describe: "generates custom template",
|
|
19
104
|
templateManager: null,
|
|
20
105
|
// tslint:disable:object-literal-sort-keys
|
|
21
106
|
builder: yargs => {
|
|
@@ -23,94 +108,42 @@ const command = {
|
|
|
23
108
|
.command({
|
|
24
109
|
aliases: ["t"],
|
|
25
110
|
command: "template [name]",
|
|
26
|
-
|
|
27
|
-
builder: {
|
|
28
|
-
|
|
111
|
+
describe: "generates custom template",
|
|
112
|
+
builder: (yargs) => {
|
|
113
|
+
return yargs
|
|
114
|
+
.option("framework", {
|
|
29
115
|
alias: "f",
|
|
30
116
|
default: "jquery",
|
|
31
117
|
describe: "Framework to generate template for",
|
|
32
118
|
type: "string"
|
|
33
|
-
}
|
|
34
|
-
|
|
119
|
+
})
|
|
120
|
+
.option("name", {
|
|
35
121
|
alias: "n",
|
|
36
122
|
default: "custom-template",
|
|
37
123
|
describe: "Template name",
|
|
38
124
|
type: "string"
|
|
39
|
-
}
|
|
40
|
-
|
|
125
|
+
})
|
|
126
|
+
.option("skip-config", {
|
|
41
127
|
alias: "s",
|
|
42
128
|
default: false,
|
|
43
129
|
describe: "Runs generate command without updating the cli config",
|
|
44
130
|
type: "boolean"
|
|
45
|
-
}
|
|
46
|
-
|
|
131
|
+
})
|
|
132
|
+
.option("type", {
|
|
47
133
|
alias: "t",
|
|
48
134
|
describe: "Project type (depends on framework)",
|
|
49
135
|
type: "string"
|
|
50
|
-
}
|
|
51
|
-
|
|
136
|
+
})
|
|
137
|
+
.usage(""); // do not show any usage instructions before the commands list
|
|
138
|
+
},
|
|
139
|
+
handler
|
|
52
140
|
})
|
|
141
|
+
.usage("") // do not show any usage instructions before the commands list
|
|
53
142
|
// at least one command is required
|
|
54
143
|
.demandCommand(1, "Please select command");
|
|
144
|
+
return yargs;
|
|
55
145
|
},
|
|
56
|
-
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
cli_core_1.GoogleAnalytics.post({
|
|
59
|
-
t: "screenview",
|
|
60
|
-
cd: "Generate"
|
|
61
|
-
});
|
|
62
|
-
// trim
|
|
63
|
-
argv.name = argv.name.trim();
|
|
64
|
-
// letter+alphanumeric check
|
|
65
|
-
if (!cli_core_1.Util.isAlphanumericExt(argv.name)) {
|
|
66
|
-
cli_core_1.Util.error(`Name '${argv.name}' is not valid. `
|
|
67
|
-
+ "Name should start with a letter and can also contain numbers, dashes and spaces.", "red");
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
const outDir = path.join(process.cwd(), argv.name);
|
|
71
|
-
if (cli_core_1.Util.directoryExists(outDir)) {
|
|
72
|
-
cli_core_1.Util.error(`Folder '${argv.name}' already exists!`, "red");
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
if (command.templateManager.getFrameworkById(argv.framework) === undefined) {
|
|
76
|
-
return cli_core_1.Util.error("Framework not supported", "red");
|
|
77
|
-
}
|
|
78
|
-
let projectLib;
|
|
79
|
-
if (argv.type) {
|
|
80
|
-
projectLib = command.templateManager.getProjectLibrary(argv.framework, argv.type);
|
|
81
|
-
if (!projectLib) {
|
|
82
|
-
return cli_core_1.Util.error(`Project type '${argv.type}' not found in framework '${argv.framework}'`);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
projectLib = command.templateManager.getProjectLibrary(argv.framework);
|
|
87
|
-
argv.type = projectLib.projectType;
|
|
88
|
-
}
|
|
89
|
-
const res = yield cli_core_1.Util.processTemplates(projectLib.generateTemplateFolderPath, outDir, {
|
|
90
|
-
templateFramework: argv.framework,
|
|
91
|
-
templateName: argv.name,
|
|
92
|
-
templateType: argv.type
|
|
93
|
-
}, {});
|
|
94
|
-
if (!res) {
|
|
95
|
-
return cli_core_1.Util.error("Template generation failed!", "red");
|
|
96
|
-
}
|
|
97
|
-
if (!argv.skipConfig) {
|
|
98
|
-
config_1.default.addHandler({ property: "customTemplates", value: "path:" + outDir, global: true, skipAnalytics: true });
|
|
99
|
-
}
|
|
100
|
-
cli_core_1.GoogleAnalytics.post({
|
|
101
|
-
t: "event",
|
|
102
|
-
ec: "$ig generate",
|
|
103
|
-
el: "subcommand: template",
|
|
104
|
-
ea: `template name: ${argv.name}; framework: ${argv.framework};` +
|
|
105
|
-
`project type: ${argv.type}; skip-config: ${argv.skipConfig}`,
|
|
106
|
-
cd1: argv.framework,
|
|
107
|
-
cd2: argv.type,
|
|
108
|
-
cd7: argv.name,
|
|
109
|
-
cd9: "template",
|
|
110
|
-
cd10: !!argv.skipConfig
|
|
111
|
-
});
|
|
112
|
-
cli_core_1.Util.log("Template generated successfully");
|
|
113
|
-
});
|
|
114
|
-
}
|
|
146
|
+
handler // for easier unit testing
|
|
115
147
|
};
|
|
116
148
|
exports.default = command;
|
|
149
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as add } from "./add";
|
|
2
|
+
export { default as build } from "./build";
|
|
3
|
+
export { default as config } from "./config";
|
|
4
|
+
export { default as doc } from "./doc";
|
|
5
|
+
export { default as generate } from "./generate";
|
|
6
|
+
export { default as list } from "./list";
|
|
7
|
+
export { default as newCommand } from "./new";
|
|
8
|
+
export { default as quickstart } from "./quickstart";
|
|
9
|
+
export { default as start } from "./start";
|
|
10
|
+
export { default as test } from "./test";
|
|
11
|
+
export { default as upgrade } from "./upgrade";
|
|
12
|
+
export * from "./types";
|
|
@@ -0,0 +1,44 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.upgrade = exports.test = exports.start = exports.quickstart = exports.newCommand = exports.list = exports.generate = exports.doc = exports.config = exports.build = exports.add = void 0;
|
|
21
|
+
var add_1 = require("./add");
|
|
22
|
+
Object.defineProperty(exports, "add", { enumerable: true, get: function () { return __importDefault(add_1).default; } });
|
|
23
|
+
var build_1 = require("./build");
|
|
24
|
+
Object.defineProperty(exports, "build", { enumerable: true, get: function () { return __importDefault(build_1).default; } });
|
|
25
|
+
var config_1 = require("./config");
|
|
26
|
+
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return __importDefault(config_1).default; } });
|
|
27
|
+
var doc_1 = require("./doc");
|
|
28
|
+
Object.defineProperty(exports, "doc", { enumerable: true, get: function () { return __importDefault(doc_1).default; } });
|
|
29
|
+
var generate_1 = require("./generate");
|
|
30
|
+
Object.defineProperty(exports, "generate", { enumerable: true, get: function () { return __importDefault(generate_1).default; } });
|
|
31
|
+
var list_1 = require("./list");
|
|
32
|
+
Object.defineProperty(exports, "list", { enumerable: true, get: function () { return __importDefault(list_1).default; } });
|
|
33
|
+
var new_1 = require("./new");
|
|
34
|
+
Object.defineProperty(exports, "newCommand", { enumerable: true, get: function () { return __importDefault(new_1).default; } });
|
|
35
|
+
var quickstart_1 = require("./quickstart");
|
|
36
|
+
Object.defineProperty(exports, "quickstart", { enumerable: true, get: function () { return __importDefault(quickstart_1).default; } });
|
|
37
|
+
var start_1 = require("./start");
|
|
38
|
+
Object.defineProperty(exports, "start", { enumerable: true, get: function () { return __importDefault(start_1).default; } });
|
|
39
|
+
var test_1 = require("./test");
|
|
40
|
+
Object.defineProperty(exports, "test", { enumerable: true, get: function () { return __importDefault(test_1).default; } });
|
|
41
|
+
var upgrade_1 = require("./upgrade");
|
|
42
|
+
Object.defineProperty(exports, "upgrade", { enumerable: true, get: function () { return __importDefault(upgrade_1).default; } });
|
|
43
|
+
__exportStar(require("./types"), exports);
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
package/lib/commands/list.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare
|
|
3
|
-
[name: string]: any;
|
|
4
|
-
templateManager: TemplateManager;
|
|
5
|
-
execute: (argv: any) => void;
|
|
6
|
-
};
|
|
1
|
+
import { CommandType } from "./types";
|
|
2
|
+
declare const command: CommandType;
|
|
7
3
|
export default command;
|
package/lib/commands/list.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
4
|
-
|
|
5
|
-
// tslint:disable:object-literal-sort-keys
|
|
6
|
-
command = {
|
|
4
|
+
const command = {
|
|
7
5
|
command: "list",
|
|
8
6
|
// use aliases here, instead of alias. With single alias yargs does not build correctly argv
|
|
9
7
|
aliases: ["l"],
|
|
10
|
-
|
|
8
|
+
describe: "list all templates",
|
|
11
9
|
builder: {
|
|
12
10
|
framework: {
|
|
13
11
|
alias: "f",
|
|
@@ -22,7 +20,7 @@ command = {
|
|
|
22
20
|
}
|
|
23
21
|
},
|
|
24
22
|
templateManager: null,
|
|
25
|
-
|
|
23
|
+
handler(argv) {
|
|
26
24
|
cli_core_1.GoogleAnalytics.post({
|
|
27
25
|
t: "screenview",
|
|
28
26
|
cd: "List"
|
|
@@ -96,3 +94,4 @@ command = {
|
|
|
96
94
|
}
|
|
97
95
|
};
|
|
98
96
|
exports.default = command;
|
|
97
|
+
//# sourceMappingURL=list.js.map
|
package/lib/commands/new.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare
|
|
3
|
-
[name: string]: any;
|
|
4
|
-
template: TemplateManager;
|
|
5
|
-
execute: (argv: any) => Promise<void>;
|
|
6
|
-
};
|
|
1
|
+
import { NewCommandType } from "./types";
|
|
2
|
+
declare const command: NewCommandType;
|
|
7
3
|
export default command;
|
package/lib/commands/new.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,54 +33,57 @@ 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 path = require("path");
|
|
36
|
+
const path = __importStar(require("path"));
|
|
14
37
|
const PromptSession_1 = require("./../PromptSession");
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
|
|
38
|
+
const TemplateManager_1 = require("../TemplateManager");
|
|
39
|
+
// explicit typing because `type: "string"` will be inferred as `type: string` which yargs will not like
|
|
40
|
+
const _framework = {
|
|
41
|
+
alias: "f",
|
|
42
|
+
default: "jquery",
|
|
43
|
+
describe: "Framework to setup project for",
|
|
44
|
+
type: "string",
|
|
45
|
+
choices: []
|
|
46
|
+
};
|
|
47
|
+
const command = {
|
|
18
48
|
command: "new [name]",
|
|
19
|
-
|
|
20
|
-
builder: {
|
|
21
|
-
|
|
49
|
+
describe: "creates a project",
|
|
50
|
+
builder: (yargs) => {
|
|
51
|
+
return yargs
|
|
52
|
+
.option("name", {
|
|
22
53
|
alias: "n",
|
|
23
54
|
describe: "Project name",
|
|
24
55
|
type: "string"
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
default: "jquery",
|
|
29
|
-
describe: "Framework to setup project for",
|
|
30
|
-
type: "string",
|
|
31
|
-
choices: []
|
|
32
|
-
},
|
|
33
|
-
"type": {
|
|
56
|
+
})
|
|
57
|
+
.option("framework", _framework)
|
|
58
|
+
.option("type", {
|
|
34
59
|
alias: "t",
|
|
35
60
|
describe: "Project type (depends on framework)",
|
|
36
61
|
type: "string"
|
|
37
|
-
}
|
|
38
|
-
|
|
62
|
+
})
|
|
63
|
+
.option("theme", {
|
|
39
64
|
alias: "th",
|
|
40
65
|
describe: "Project theme (depends on project type)",
|
|
41
66
|
type: "string"
|
|
42
|
-
}
|
|
43
|
-
|
|
67
|
+
})
|
|
68
|
+
.option("skip-git", {
|
|
44
69
|
alias: "sg",
|
|
45
70
|
describe: "Do not automatically initialize repository for the project with Git",
|
|
46
71
|
type: "boolean"
|
|
47
|
-
}
|
|
48
|
-
|
|
72
|
+
})
|
|
73
|
+
.option("skip-install", {
|
|
49
74
|
alias: "si",
|
|
50
75
|
describe: "Do not automatically install packages",
|
|
51
76
|
type: "boolean"
|
|
52
|
-
}
|
|
53
|
-
|
|
77
|
+
})
|
|
78
|
+
.option("template", {
|
|
54
79
|
describe: "Project template",
|
|
55
80
|
type: "string"
|
|
56
|
-
}
|
|
81
|
+
})
|
|
82
|
+
.usage(""); // do not show any usage instructions before the commands list
|
|
57
83
|
},
|
|
58
|
-
|
|
59
|
-
execute(argv) {
|
|
84
|
+
handler(argv) {
|
|
60
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
var _a, _b, _c, _d;
|
|
61
87
|
cli_core_1.GoogleAnalytics.post({
|
|
62
88
|
t: "screenview",
|
|
63
89
|
cd: "New"
|
|
@@ -66,7 +92,7 @@ command = {
|
|
|
66
92
|
return cli_core_1.Util.error("There is already an existing project.", "red");
|
|
67
93
|
}
|
|
68
94
|
if (!argv.name) {
|
|
69
|
-
const prompts = new PromptSession_1.PromptSession(command.
|
|
95
|
+
const prompts = new PromptSession_1.PromptSession(command.templateManager || new TemplateManager_1.TemplateManager());
|
|
70
96
|
yield prompts.start();
|
|
71
97
|
return;
|
|
72
98
|
}
|
|
@@ -82,20 +108,20 @@ command = {
|
|
|
82
108
|
cli_core_1.Util.error(`Folder "${argv.name}" already exists!`, "red");
|
|
83
109
|
return;
|
|
84
110
|
}
|
|
85
|
-
if (command.
|
|
111
|
+
if (((_a = command.templateManager) === null || _a === void 0 ? void 0 : _a.getFrameworkById(argv.framework)) === undefined) {
|
|
86
112
|
return cli_core_1.Util.error("Framework not supported", "red");
|
|
87
113
|
}
|
|
88
114
|
let projectLib;
|
|
89
115
|
if (argv.type) {
|
|
90
|
-
projectLib = command.
|
|
116
|
+
projectLib = (_b = command.templateManager) === null || _b === void 0 ? void 0 : _b.getProjectLibrary(argv.framework, argv.type);
|
|
91
117
|
if (!projectLib) {
|
|
92
118
|
return cli_core_1.Util.error(`Project type "${argv.type}" not found in framework '${argv.framework}'`);
|
|
93
119
|
}
|
|
94
120
|
}
|
|
95
121
|
else {
|
|
96
|
-
projectLib = command.
|
|
122
|
+
projectLib = (_c = command.templateManager) === null || _c === void 0 ? void 0 : _c.getProjectLibrary(argv.framework);
|
|
97
123
|
}
|
|
98
|
-
if (command.
|
|
124
|
+
if (((_d = command.templateManager) === null || _d === void 0 ? void 0 : _d.getFrameworkById(argv.framework).id) === "angular" && projectLib.projectType === "igx-ts") {
|
|
99
125
|
cli_core_1.Util.warn("Psst! Did you know you can use our schematics package with Angular CLI to create and modify your projects?", "yellow");
|
|
100
126
|
cli_core_1.Util.warn("Read more at: https://www.infragistics.com/products/ignite-ui-angular/angular/components/general/cli-overview", "yellow");
|
|
101
127
|
}
|
|
@@ -147,6 +173,10 @@ command = {
|
|
|
147
173
|
cli_core_1.Util.log(" ig add start guided mode for adding views to the app");
|
|
148
174
|
cli_core_1.Util.log(" ig start starts a web server and opens the app in the default browser");
|
|
149
175
|
});
|
|
176
|
+
},
|
|
177
|
+
addChoices(choices) {
|
|
178
|
+
_framework.choices = choices;
|
|
150
179
|
}
|
|
151
180
|
};
|
|
152
181
|
exports.default = command;
|
|
182
|
+
//# sourceMappingURL=new.js.map
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
desc: string;
|
|
4
|
-
builder: {
|
|
5
|
-
framework: {
|
|
6
|
-
alias: string;
|
|
7
|
-
default: string;
|
|
8
|
-
describe: string;
|
|
9
|
-
type: string;
|
|
10
|
-
choices: string[];
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
execute(argv: any): Promise<void>;
|
|
14
|
-
};
|
|
1
|
+
import { CommandType } from "./types";
|
|
2
|
+
declare const command: CommandType;
|
|
15
3
|
export default command;
|
|
@@ -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,22 +33,23 @@ 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 path = require("path");
|
|
14
|
-
const resolve = require("resolve");
|
|
15
|
-
// tslint:disable:object-literal-sort-keys
|
|
36
|
+
const path = __importStar(require("path"));
|
|
37
|
+
const resolve = __importStar(require("resolve"));
|
|
16
38
|
const command = {
|
|
17
39
|
command: "quickstart",
|
|
18
|
-
|
|
19
|
-
builder: {
|
|
20
|
-
|
|
40
|
+
describe: "creates rich feature grid",
|
|
41
|
+
builder: (yargs) => {
|
|
42
|
+
return yargs
|
|
43
|
+
.option("framework", {
|
|
21
44
|
alias: "f",
|
|
22
45
|
default: "jquery",
|
|
23
46
|
describe: "Framework to setup quickstart for",
|
|
24
47
|
type: "string",
|
|
25
48
|
choices: ["jquery", "react", "angular"]
|
|
26
|
-
}
|
|
49
|
+
})
|
|
50
|
+
.usage(""); // do not show any usage instructions before the commands list
|
|
27
51
|
},
|
|
28
|
-
|
|
52
|
+
handler(argv) {
|
|
29
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
54
|
cli_core_1.GoogleAnalytics.post({
|
|
31
55
|
t: "screenview",
|
|
@@ -90,3 +114,4 @@ const command = {
|
|
|
90
114
|
}
|
|
91
115
|
};
|
|
92
116
|
exports.default = command;
|
|
117
|
+
//# sourceMappingURL=quickstart.js.map
|