diff --git a/.vscode/cSpell.json b/.vscode/cSpell.json index 2ea37a581..d1b39e73a 100644 --- a/.vscode/cSpell.json +++ b/.vscode/cSpell.json @@ -1,13 +1,11 @@ -// cSpell Settings { - // Version of the setting file. Always 0.1 - "version": "0.1", // language - current active spelling language "language": "en", // words - list of words to be always considered correct "words": [ + "igniteui", "infragistics", - "igniteui" + "webcomponents" ], // flagWords - list of words to be always considered incorrect // This is useful for offensive words and common spelling errors. diff --git a/.vscode/launch.json b/.vscode/launch.json index 1e5e69d8c..e14a2aa9d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -109,21 +109,6 @@ "console": "externalTerminal", "preLaunchTask": "build", "outFiles": ["${workspaceFolder}/**/*.js"], - "args": [ - "new", - "reactproj", - "--framework=react" - ] - }, - { - "type": "node", - "request": "launch", - "name": "Launch New React TS ES6", - "cwd": "${workspaceRoot}/output", - "program": "${workspaceRoot}/packages/cli/bin/execute.js", - "console": "externalTerminal", - "preLaunchTask": "build", - "outFiles": ["${workspaceFolder}/**/*.js"], "args": [ "new", "reactproj", diff --git a/README.md b/README.md index d91cd07c4..bcd5e256d 100644 --- a/README.md +++ b/README.md @@ -101,9 +101,9 @@ ig new "IG Project" --framework=angular --type=igx-ts --template=side-nav ``` #### Generate Ignite UI for React project -To create a new project with Ignite UI for React use [ig new](https://github.com/IgniteUI/igniteui-cli/wiki/New#creating-ignite-ui-for-react-applications-v400) by specifying `react` as framework and `igr-es6` as project type: +To create a new project with Ignite UI for React use [ig new](https://github.com/IgniteUI/igniteui-cli/wiki/New#creating-ignite-ui-for-react-applications-v400) by specifying `react` as framework and `igr-ts` as project type: ```bash -ig new "IG Project" --framework=react --type=igr-es6 +ig new "IG Project" --framework=react --type=igr-ts ``` #### Generate Ignite UI for Web Components project diff --git a/packages/cli/README.md b/packages/cli/README.md index 48072ae4d..0be1a3dbe 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -79,9 +79,9 @@ The `igniteui-cli` makes full use of the component definitions provided by [`ign #### Generate Ignite UI for React project -To create a new project with Ignite UI for React use [ig new](https://github.com/IgniteUI/igniteui-cli/wiki/New#creating-ignite-ui-for-react-applications-v400) by specifying `react` as framework and `igr-es6` as project type: +To create a new project with Ignite UI for React use [ig new](https://github.com/IgniteUI/igniteui-cli/wiki/New#creating-ignite-ui-for-react-applications-v400) by specifying `react` as framework and `igr-ts` as project type: ```bash -ig new "IG Project" --framework=react --type=igr-es6 +ig new "IG Project" --framework=react --type=igr-ts ``` #### Adding components diff --git a/packages/cli/lib/commands/start.ts b/packages/cli/lib/commands/start.ts index 4dff22c1c..9607a4a45 100644 --- a/packages/cli/lib/commands/start.ts +++ b/packages/cli/lib/commands/start.ts @@ -65,7 +65,7 @@ const command: StartCommandType = { cd14: config.project.theme }); - let port = Number(argv.port) || defaultPort; + const port = Number(argv.port) || defaultPort; // TODO: consider piping the stdin so that we handle the cp's termination // this may require additional logic to be implemented if the cp asks for input const options: ExecSyncOptions = { stdio: "inherit", killSignal: "SIGINT" }; @@ -82,23 +82,11 @@ const command: StartCommandType = { browserSync.init(bsConfig); break; - case "react": - if (port) { - if (projectType === "igr-ts") { - execSyncNpmStart(port, options); - } else { - // https://facebook.github.io/create-react-app/docs/advanced-configuration - // react-scripts start "--port=dafaultPort" is not a valid command for all environments. - // .env file is included and used by both igr-es6 and es6 now, - // to specify the port for all environments (Windows, Mac, etc) - process.env.PORT = `${port}`; - port = null; - } - } - /* falls through */ case "angular": + case "react": case "webcomponents": execSyncNpmStart(port, options); + break; default: break; } diff --git a/packages/cli/lib/templates/IgniteUIForReactTemplate.ts b/packages/cli/lib/templates/IgniteUIForReactTemplate.ts index f0b36507e..1521bddd5 100644 --- a/packages/cli/lib/templates/IgniteUIForReactTemplate.ts +++ b/packages/cli/lib/templates/IgniteUIForReactTemplate.ts @@ -72,11 +72,6 @@ export class IgniteUIForReactTemplate implements Template { options.parentRoutingModulePath = "src/app/app-routes.tsx"; } - if (this.projectType === "igr-es6") { - this.registerJSONRoute(projectPath, name, options.parentRoutingModulePath); - return; - } - const routeModulePath: string = options.parentRoutingModulePath; if (!(options && options.skipRoute) @@ -148,27 +143,4 @@ export class IgniteUIForReactTemplate implements Template { const name = Util.nameFromPath(pathName); return Util.lowerDashed(name); } - - protected registerJSONRoute(projectPath: string, name: string, routingModulePath: string) { - const configFile = fs.readFileSync(path.join(projectPath, routingModulePath), "utf8"); - const viewsArr = JSON.parse(configFile); - viewsArr.push({ - componentPath: this.getViewLink(name), - path: "/" + this.folderName(Util.nameFromPath(name)), - text: this.getToolbarLink(name) - }); - - fs.writeFileSync(path.join(projectPath, routingModulePath), JSON.stringify(viewsArr, null, 4)); - } - - protected getViewLink(name: string): string { - const filePath = "./views/" + this.folderName(name); - return filePath; - } - - protected getToolbarLink(name: string): string { - name = Util.nameFromPath(name); - const toolbarLink = name.replace(/\w\S*/g, txt => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()); - return toolbarLink; - } } diff --git a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/index.js deleted file mode 100644 index e7dcfcb97..000000000 --- a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,62 +0,0 @@ -import React, { Component } from 'react'; -import { IgrBulletGraphModule } from 'igniteui-react-gauges'; -import { IgrBulletGraph } from 'igniteui-react-gauges'; -import style from './style.css'; - -IgrBulletGraphModule.register(); - - -export default class $(ClassName) extends Component { - title = 'Bullet Graph' - state = { - data: [] - }; - - render() { - return ( -
-

{this.title}

-
- Read more on the  - - official documentation page - -
-
-
- - -
-
- - -
-
-
- ) - } -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/style.css deleted file mode 100644 index 1040e7ad7..000000000 --- a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,12 +0,0 @@ -:local(.container) { - padding-top: 24px; - display: flex; - flex-flow: row; - justify-content: space-around; -} -:local(.title) { - color: rgb(0, 153, 255); -} -:local(.graph) { - width: 50%; -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/bullet-graph/default/index.ts b/packages/cli/templates/react/igr-es6/bullet-graph/default/index.ts deleted file mode 100644 index 2fc305c0d..000000000 --- a/packages/cli/templates/react/igr-es6/bullet-graph/default/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrBulletGraphTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Bullet Graph"]; - this.controlGroup = "Gauges"; - this.listInComponentTemplates = true; - this.id = "bullet-graph"; - this.projectType = "igr-es6"; - this.name = "Bullet Graph"; - this.description = `allows for a linear and concise view of measures compared against a scale.`; - this.packages = ["igniteui-react-gauges@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrBulletGraphTemplate(); diff --git a/packages/cli/templates/react/igr-es6/bullet-graph/index.ts b/packages/cli/templates/react/igr-es6/bullet-graph/index.ts deleted file mode 100644 index 45e52c0c9..000000000 --- a/packages/cli/templates/react/igr-es6/bullet-graph/index.ts +++ /dev/null @@ -1,15 +0,0 @@ - -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrBulletGraphComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Bullet Graph"; - this.group = "Gauges"; - this.description = `allows for a linear and concise view of measures compared against a scale.`; - } -} -module.exports = new IgrBulletGraphComponent(); diff --git a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/index.js deleted file mode 100644 index b83030006..000000000 --- a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,45 +0,0 @@ -import React, { Component } from 'react'; -import { IgrCategoryChartModule } from 'igniteui-react-charts'; -import { IgrCategoryChart } from 'igniteui-react-charts'; -import style from './style.css'; - -IgrCategoryChartModule.register(); - -var data = [ - { 'CountryName': 'China', 'Pop1995': 1216, 'Pop2005': 1297, 'Pop2015': 1361, 'Pop2025': 1394 }, - { 'CountryName': 'India', 'Pop1995': 920, 'Pop2005': 1090, 'Pop2015': 1251, 'Pop2025': 1396 }, - { 'CountryName': 'United States', 'Pop1995': 266, 'Pop2005': 295, 'Pop2015': 322, 'Pop2025': 351 }, - { 'CountryName': 'Indonesia', 'Pop1995': 197, 'Pop2005': 229, 'Pop2015': 256, 'Pop2025': 277 }, - { 'CountryName': 'Brazil', 'Pop1995': 161, 'Pop2005': 186, 'Pop2015': 204, 'Pop2025': 218 } -]; - -export default class $(ClassName) extends Component { - title = 'Category Chart' - state = { - data: [] - } - - componentDidMount() { - this.setState({ data }); - } - - render() { - return ( -
-

{this.title}

-
- Read more on the  - - official documentation page - -
-
- - -
-
- ) - } -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/style.css deleted file mode 100644 index b8c09ee23..000000000 --- a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,9 +0,0 @@ -:local(.container) { - padding-top: 24px; - display: flex; - flex-flow: row; - justify-content: center; -} -:local(.title) { - color: rgb(0, 153, 255); -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/category-chart/default/index.ts b/packages/cli/templates/react/igr-es6/category-chart/default/index.ts deleted file mode 100644 index bcc4e17d8..000000000 --- a/packages/cli/templates/react/igr-es6/category-chart/default/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrCategoryChartTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Category Chart"]; - this.controlGroup = "Charts"; - this.listInComponentTemplates = true; - this.id = "category-chart"; - this.projectType = "igr-es6"; - this.name = "Category Chart"; - this.description = `makes visualizing category data easy. Simplifies the complexities - of the data visualization domain into manageable API`; - this.packages = ["igniteui-react-charts@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrCategoryChartTemplate(); diff --git a/packages/cli/templates/react/igr-es6/category-chart/index.ts b/packages/cli/templates/react/igr-es6/category-chart/index.ts deleted file mode 100644 index df8ad9f83..000000000 --- a/packages/cli/templates/react/igr-es6/category-chart/index.ts +++ /dev/null @@ -1,16 +0,0 @@ - -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrCategoryChartComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Category Chart"; - this.group = "Charts"; - this.description = `makes visualizing category data easy. Simplifies the complexities - of the data visualization domain into manageable API`; - } -} -module.exports = new IgrCategoryChartComponent(); diff --git a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/index.js deleted file mode 100644 index db7791099..000000000 --- a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,85 +0,0 @@ -import React, { Component } from 'react'; -import { IgrDoughnutChartModule } from 'igniteui-react-charts'; -import { IgrDoughnutChart } from 'igniteui-react-charts'; -import { IgrRingSeriesModule } from 'igniteui-react-charts'; -import { IgrRingSeries } from 'igniteui-react-charts'; -import { IgrItemLegendModule } from 'igniteui-react-charts'; -import { IgrItemLegend } from 'igniteui-react-charts'; - -import style from './style.css'; - -IgrItemLegendModule.register(); - -IgrDoughnutChartModule.register(); -IgrRingSeriesModule.register(); - - -const data: any = [ - { MarketShare: 30, Company: "Google", }, - { MarketShare: 15, Company: "Microsoft", }, - { MarketShare: 30, Company: "Apple", }, - { MarketShare: 15, Company: "Samsung", }, - { MarketShare: 10, Company: "Other", }, -]; - -export default class $(ClassName) extends Component { - title = 'Doughnut Chart' - data = []; - - chart = null; - legend = null; - - onChartRef(chart) { - this.chart = chart; - if (this.legend) { - this.chart.actualSeries[0].legend = this.legend; - } - } - - onLegendRef(legend) { - this.legend = legend; - if (this.chart) { - this.chart.actualSeries[0].legend = this.legend; - } - } - - state = { - data: [] - }; - - componentWillMount() { - this.setState({ data }); - this.onChartRef = this.onChartRef.bind(this); - this.onLegendRef = this.onLegendRef.bind(this); - } - - render() { - return ( -
-

{this.title}

-
- Read more on the  - - official documentation page - -
-
-
- -
-
- - - -
-
-
- ) - } -} diff --git a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/style.css deleted file mode 100644 index bd4482f69..000000000 --- a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,9 +0,0 @@ -:local(.container) { - display: flex; - flex-flow: row; - justify-content: center; - padding-top: 24px; -} -:local(.title) { - color: rgb(0, 153, 255); -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/doughnut-chart/default/index.ts b/packages/cli/templates/react/igr-es6/doughnut-chart/default/index.ts deleted file mode 100644 index fd0e47bac..000000000 --- a/packages/cli/templates/react/igr-es6/doughnut-chart/default/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrDoughnutChartTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Doughnut Chart"]; - this.controlGroup = "Charts"; - this.listInComponentTemplates = true; - this.id = "doughnut-chart"; - this.projectType = "igr-es6"; - this.name = "Doughnut Chart"; - this.description = `proportionally illustrate the occurrences of variables.`; - this.packages = ["igniteui-react-charts@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrDoughnutChartTemplate(); diff --git a/packages/cli/templates/react/igr-es6/doughnut-chart/index.ts b/packages/cli/templates/react/igr-es6/doughnut-chart/index.ts deleted file mode 100644 index 5dba66766..000000000 --- a/packages/cli/templates/react/igr-es6/doughnut-chart/index.ts +++ /dev/null @@ -1,15 +0,0 @@ - -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrDoughnutChartComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Doughnut Chart"; - this.group = "Charts"; - this.description = `proportionally illustrate the occurrences of variables.`; - } -} -module.exports = new IgrDoughnutChartComponent(); diff --git a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/index.js deleted file mode 100644 index 933efca38..000000000 --- a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,55 +0,0 @@ -import React, { Component } from 'react' -import { IgrFinancialChartModule } from 'igniteui-react-charts'; -import { IgrFinancialChart } from 'igniteui-react-charts'; -import style from './style.css'; - -IgrFinancialChartModule.register(); - -const data: any = [ - { time: new Date(2013, 1, 1), open: 268.93, high: 268.93, low: 262.80, close: 265.00, volume: 6118146 }, - { time: new Date(2013, 1, 4), open: 262.78, high: 264.68, low: 259.07, close: 259.98, volume: 3723793 }, - { time: new Date(2013, 1, 5), open: 262.00, high: 268.03, low: 261.46, close: 266.89, volume: 4013780 }, - { time: new Date(2013, 1, 6), open: 265.16, high: 266.89, low: 261.11, close: 262.22, volume: 2772204 }, - { time: new Date(2013, 1, 7), open: 264.10, high: 264.10, low: 255.11, close: 260.23, volume: 3977065 }, - { time: new Date(2013, 1, 8), open: 261.40, high: 265.25, low: 260.56, close: 261.95, volume: 3879628 }, - { time: new Date(2013, 1, 11), open: 263.20, high: 263.25, low: 256.60, close: 257.21, volume: 3407457 }, - { time: new Date(2013, 1, 12), open: 259.19, high: 260.16, low: 257.00, close: 258.70, volume: 2944730 }, - { time: new Date(2013, 1, 13), open: 261.53, high: 269.96, low: 260.30, close: 269.47, volume: 5295786 }, - { time: new Date(2013, 1, 14), open: 267.37, high: 270.65, low: 265.40, close: 269.24, volume: 3464080 }, - { time: new Date(2013, 1, 15), open: 267.63, high: 268.92, low: 263.11, close: 265.09, volume: 3981233 } -]; - - -export default class $(ClassName) extends Component { - title = 'Financial Chart'; - state = { - data: [] - } - - componentWillMount() { - this.setState({ - data - }); - } - - render() { - return ( -
-

{this.title}

-
- Read more on the  - - official documentation page - -
-
- - -
-
- ) - } -} diff --git a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/style.css deleted file mode 100644 index 9aaa77850..000000000 --- a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,10 +0,0 @@ -:local(.container) { - padding-top: 24px; - display: flex; - flex-flow: row; - justify-content: center; - text-align: left; -} -:local(.title) { - color: rgb(0, 153, 255); -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/financial-chart/default/index.ts b/packages/cli/templates/react/igr-es6/financial-chart/default/index.ts deleted file mode 100644 index 5e0500495..000000000 --- a/packages/cli/templates/react/igr-es6/financial-chart/default/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrFinancialChartTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Financial Chart"]; - this.controlGroup = "Charts"; - // set to true once bug with chart destoy is fixed - this.listInComponentTemplates = false; - this.id = "financial-chart"; - this.projectType = "igr-es6"; - this.name = "Financial Chart"; - this.description = `charting component that makes it easy to visualize financial data by - using a simple and intuitive API.`; - this.packages = ["igniteui-react-charts@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrFinancialChartTemplate(); diff --git a/packages/cli/templates/react/igr-es6/financial-chart/index.ts b/packages/cli/templates/react/igr-es6/financial-chart/index.ts deleted file mode 100644 index c29c42491..000000000 --- a/packages/cli/templates/react/igr-es6/financial-chart/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrFinancialChartComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Financial Chart"; - this.group = "Charts"; - this.description = `charting component that makes it easy to visualize financial data by - using a simple and intuitive API.`; - } -} -module.exports = new IgrFinancialChartComponent(); diff --git a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/data.js b/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/data.js deleted file mode 100644 index 06ba27b28..000000000 --- a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/data.js +++ /dev/null @@ -1,46 +0,0 @@ -export default [{ - Discontinued: false, - OrderDate: new Date('2012-02-12'), - ProductID: 1, - ProductName: 'Chai', - QuantityPerUnit: '10 boxes x 20 bags', - ReorderLevel: 10, - UnitPrice: 18.0000, - UnitsInStock: 39 -}, { - Discontinued: false, - OrderDate: new Date('2003-03-17'), - ProductID: 2, - ProductName: 'Chang', - QuantityPerUnit: '24 - 12 oz bottles', - ReorderLevel: 25, - UnitPrice: 19.0000, - UnitsInStock: 17 -}, { - Discontinued: false, - OrderDate: new Date('2006-03-17'), - ProductID: 3, - ProductName: 'Aniseed Syrup', - QuantityPerUnit: '12 - 550 ml bottles', - ReorderLevel: 25, - UnitPrice: 10.0000, - UnitsInStock: 13 -}, { - Discontinued: false, - OrderDate: new Date('2016-03-17'), - ProductID: 4, - ProductName: 'Chef Antons Cajun Seasoning', - QuantityPerUnit: '48 - 6 oz jars', - ReorderLevel: 0, - UnitPrice: 22.0000, - UnitsInStock: 53 -}, { - Discontinued: true, - OrderDate: new Date('2011-11-11'), - ProductID: 5, - ProductName: 'Chef Antons Gumbo Mix', - QuantityPerUnit: '36 boxes', - ReorderLevel: 0, - UnitPrice: 21.3500, - UnitsInStock: 0 -}]; diff --git a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/index.js deleted file mode 100644 index 96d0c993a..000000000 --- a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/index.js +++ /dev/null @@ -1,46 +0,0 @@ -import React, { Component } from 'react'; -import style from './style.css'; -import { IgrDataGridModule } from 'igniteui-react-grids'; -import { IgrDataGrid } from 'igniteui-react-grids'; -import { IgrNumericColumn } from 'igniteui-react-grids'; -import { IgrTextColumn } from 'igniteui-react-grids'; -import { IgrDateTimeColumn } from 'igniteui-react-grids'; - -import data from './data'; - -IgrDataGridModule.register(); - -export default class $(ClassName) extends Component { - title = 'Grid'; - state = { - } - - render() { - this.data = data; - return ( -
-

{this.title}

-
- Read more on the  - - official documentation page - -
-
-
- - - - - - - -
-
-
- ) - } -} diff --git a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/style.css deleted file mode 100644 index bb0a0030d..000000000 --- a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/style.css +++ /dev/null @@ -1,17 +0,0 @@ -:local(.container) { - padding-top: 24px; - display: flex; - flex-flow: column; - justify-content: center; - align-items: center; -} - -:local(.title) { - color: rgb(0, 153, 255); -} - -:local(.grid) { - width: 80%; - margin-bottom: 24px; - border: 1px solid rgb(0, 153, 255); -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/grid/basic/index.ts b/packages/cli/templates/react/igr-es6/grid/basic/index.ts deleted file mode 100644 index 105ce7a28..000000000 --- a/packages/cli/templates/react/igr-es6/grid/basic/index.ts +++ /dev/null @@ -1,24 +0,0 @@ - -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class GridTemplate extends IgniteUIForReactTemplate { - /** - * - */ - constructor() { - super(__dirname); - this.id = "grid"; - this.name = "Grid"; - this.widget = "igGrid"; - this.description = "IgrGrid template for React"; - this.projectType = "igr-es6"; - this.components = ["Grid"]; - this.controlGroup = "Data Grids"; - // TODO: read version from igniteui-react-core in package.json - this.packages = ["igniteui-react-grids@~19.2.3", "igniteui-react-inputs@~19.2.3", - "igniteui-react-layouts@~19.2.3"]; - - this.hasExtraConfiguration = false; - } -} -module.exports = new GridTemplate(); diff --git a/packages/cli/templates/react/igr-es6/grid/index.ts b/packages/cli/templates/react/igr-es6/grid/index.ts deleted file mode 100644 index c0005ef4a..000000000 --- a/packages/cli/templates/react/igr-es6/grid/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrDataGridComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Data Grid"; - this.group = "Grids"; - this.description = "pick from grids: basic, sorting, templating."; - } -} -module.exports = new IgrDataGridComponent(); diff --git a/packages/cli/templates/react/igr-es6/groups.json b/packages/cli/templates/react/igr-es6/groups.json deleted file mode 100644 index f55a8a30b..000000000 --- a/packages/cli/templates/react/igr-es6/groups.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Gauges": "scale measure Controls including Linear and Radial Gauge and Bullet Graph.", - "Charts": "high-performance data visualization for category and financial data.", - "Grids": "bind and display data sets with little coding or configuration." -} diff --git a/packages/cli/templates/react/igr-es6/index.ts b/packages/cli/templates/react/igr-es6/index.ts deleted file mode 100644 index a4c23d568..000000000 --- a/packages/cli/templates/react/igr-es6/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseProjectLibrary } from "@igniteui/cli-core"; - -class IgrReactProjectLibrary extends BaseProjectLibrary { - constructor() { - super(__dirname); - this.name = "Ignite UI for React (deprecated)"; - this.projectType = "igr-es6"; - this.themes = ["default"]; - - const groups = require("./groups.json"); - // tslint:disable-next-line:forin - for (const key in groups) { - this.groupDescriptions.set(key, groups[key]); - } - } -} -module.exports = new IgrReactProjectLibrary(); diff --git a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/index.js deleted file mode 100644 index 4af8aebbf..000000000 --- a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,62 +0,0 @@ -import React, { Component } from 'react'; -import style from './style.css'; -import { IgrLinearGaugeModule } from 'igniteui-react-gauges'; -import { IgrLinearGauge } from 'igniteui-react-gauges'; - -IgrLinearGaugeModule.register(); - -export default class $(ClassName) extends Component { - title = 'Linear Gauge'; - render() { - return ( -
-

{this.title}

-
- Read more on the  - - official documentation page - -
-
-
- - -
-
- - -
-
-
- ) - } -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/style.css deleted file mode 100644 index 31590f1ec..000000000 --- a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,12 +0,0 @@ -:local(.container) { - padding-top: 24px; - display: flex; - flex-flow: row; - justify-content: space-around; -} -:local(.title) { - color: rgb(0, 153, 255); -} -:local(.gauge) { - width: 50%; -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/linear-gauge/default/index.ts b/packages/cli/templates/react/igr-es6/linear-gauge/default/index.ts deleted file mode 100644 index 92a00c735..000000000 --- a/packages/cli/templates/react/igr-es6/linear-gauge/default/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrLinearGaugeTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Linear Gauge"]; - this.controlGroup = "Gauges"; - this.listInComponentTemplates = true; - this.id = "linear-gauge"; - this.projectType = "igr-es6"; - this.name = "Linear Gauge"; - this.description = `value compared against a scale and one or more ranges.`; - this.packages = ["igniteui-react-gauges@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrLinearGaugeTemplate(); diff --git a/packages/cli/templates/react/igr-es6/linear-gauge/index.ts b/packages/cli/templates/react/igr-es6/linear-gauge/index.ts deleted file mode 100644 index ad67748de..000000000 --- a/packages/cli/templates/react/igr-es6/linear-gauge/index.ts +++ /dev/null @@ -1,15 +0,0 @@ - -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrLinearGaugeComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Linear Gauge"; - this.group = "Gauges"; - this.description = `value compared against a scale and one or more ranges.`; - } -} -module.exports = new IgrLinearGaugeComponent(); diff --git a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/index.js deleted file mode 100644 index 38bc72df1..000000000 --- a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,83 +0,0 @@ -import React, { Component } from 'react'; -import { IgrPieChartModule } from 'igniteui-react-charts'; -import { IgrPieChart } from 'igniteui-react-charts'; -import { IgrItemLegend } from 'igniteui-react-charts'; -import { IgrItemLegendModule } from 'igniteui-react-charts'; - -import style from './style.css'; - -IgrPieChartModule.register(); -IgrItemLegendModule.register(); - -const data: any = [ - { MarketShare: 30, Company: "Google", }, - { MarketShare: 15, Company: "Microsoft", }, - { MarketShare: 30, Company: "Apple", }, - { MarketShare: 15, Company: "Samsung", }, - { MarketShare: 10, Company: "Other", }, -]; - -export default class $(ClassName) extends Component { - title = 'Pie Chart'; - state = { - data: [] - }; - - legend = null; - chart = null; - - onLegendRef(legend) { - this.legend = legend; - if (this.chart) { - this.chart.legend = this.legend; - } - } - - onChartRef(chart) { - this.chart = chart; - if (this.chart) { - this.chart.legend = this.legend; - } - } - - componentWillMount() { - this.setState({ - data - }); - this.onLegendRef = this.onLegendRef.bind(this); - this.onChartRef = this.onChartRef.bind(this); - } - - handleClick() { - debugger; - } - - render() { - return ( -
-

{this.title}

-
- Read more on the  - - official documentation page - -
-
-
- -
-
- - -
-
-
- ) - } -} diff --git a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/style.css deleted file mode 100644 index bd4482f69..000000000 --- a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,9 +0,0 @@ -:local(.container) { - display: flex; - flex-flow: row; - justify-content: center; - padding-top: 24px; -} -:local(.title) { - color: rgb(0, 153, 255); -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/pie-chart/default/index.ts b/packages/cli/templates/react/igr-es6/pie-chart/default/index.ts deleted file mode 100644 index 250b43d4a..000000000 --- a/packages/cli/templates/react/igr-es6/pie-chart/default/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrPieChartTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Pie Chart"]; - this.controlGroup = "Charts"; - this.listInComponentTemplates = true; - this.id = "pie-chart"; - this.projectType = "igr-es6"; - this.name = "Pie Chart"; - this.description = `easily illustate the proportions of data entries`; - this.packages = ["igniteui-react-charts@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrPieChartTemplate(); diff --git a/packages/cli/templates/react/igr-es6/pie-chart/index.ts b/packages/cli/templates/react/igr-es6/pie-chart/index.ts deleted file mode 100644 index bc47669df..000000000 --- a/packages/cli/templates/react/igr-es6/pie-chart/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrPieChartComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Pie Chart"; - this.group = "Charts"; - this.description = `easily illustate the proportions of data entries`; - } -} -module.exports = new IgrPieChartComponent(); diff --git a/packages/cli/templates/react/igr-es6/projects/_base/__dot__eslintrc.json b/packages/cli/templates/react/igr-es6/projects/_base/__dot__eslintrc.json deleted file mode 100644 index e6aa150f1..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/__dot__eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "react-app" -} diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/README.md b/packages/cli/templates/react/igr-es6/projects/_base/files/README.md deleted file mode 100644 index 8dd09f816..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# $(name) - -This project was generated with [Ignite UI CLI](https://github.com/IgniteUI/igniteui-cli) version $(cliVersion).
-The template builds upon a project bootstrapped with [Create React App](https://github.com/facebook/create-react-app), so all CRA features are available in this project. - -## Development server - -Run `ig start` to build the application, start a web server and open the application in the default browser.
-The default serving port is `http://localhost:3003/`. Default serving port can be configured in `.env` via `PORT` property. - -## Build - -Run `ig build` to build the application into an output directory. - -## Step by step mode - -If you want to get a guided experience through the available options, you can initialize the step by step mode that will help you to create and setup your new application, as well as update project previously created with the Ignite UI CLI. To start the guide, simply run the `ig` command. - -## List templates - -The `ig list` command lists all available templates for this project. - -## Adding components - -Add a new component or template to the project passing component ID and choosing a name. - -`ig add ` - -The ID matches either a component ("grid", "category-chart", etc) or a predefined template. Predefined templates can provide either multiple components or fulfilling a specific use case like "form-validation", "master-detail" and so on. - -## Running unit tests - -Run `ig test` to execute the unit tests. - -## Commands Help - -`ig help` lists the available commands and provides a brief description of what they do. - -## Learn More - -To get more help on the IgniteUI CLI go check out the [IgniteUI CLI Wiki](https://github.com/IgniteUI/igniteui-cli/wiki). - -Learn more about CRA features in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - - - diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/__dot__editorconfig b/packages/cli/templates/react/igr-es6/projects/_base/files/__dot__editorconfig deleted file mode 100644 index 0f3bb618c..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/__dot__editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[*.js] -indent_style = space -indent_size = 2 diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/__dot__env b/packages/cli/templates/react/igr-es6/projects/_base/files/__dot__env deleted file mode 100644 index fe690d592..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/__dot__env +++ /dev/null @@ -1 +0,0 @@ -PORT=3003 diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/__dot__gitignore b/packages/cli/templates/react/igr-es6/projects/_base/files/__dot__gitignore deleted file mode 100644 index 4d29575de..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/__dot__gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/ignite-ui-cli.json b/packages/cli/templates/react/igr-es6/projects/_base/files/ignite-ui-cli.json deleted file mode 100644 index feb57d95e..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/ignite-ui-cli.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "$(cliVersion)", - "project": { - "defaultPort": 3003, - "framework": "react", - "projectType": "igr-es6", - "projectTemplate": "$(projectTemplate)", - "theme": "$(theme)", - "isBundle": false, - "components": [], - "sourceFiles": [], - "isShowcase": false, - "version": "" - }, - "build": {} -} diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/package.json b/packages/cli/templates/react/igr-es6/projects/_base/files/package.json deleted file mode 100644 index 570c35177..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "$(dash-name)", - "version": "0.1.0", - "private": true, - "dependencies": { - "igniteui-react-core": "~19.0.0", - "react": "^16.8.2", - "react-app-polyfill": "^0.2.0", - "react-dom": "^16.8.2", - "react-router-dom": "^4.3.1", - "react-scripts": "2.1.5" - }, - "devDependencies": { - "igniteui-cli": "~$(cliVersion)", - "enzyme": "^3.9.0", - "enzyme-adapter-react-16": "^1.9.1" - }, - "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test --transformIgnorePatterns \"node_modules/(?!igniteui-react)/\" --env=jsdom", - "eject": "react-scripts eject" - }, - "browserslist": [ - ">0.2%", - "not dead", - "not ie <= 11", - "not op_mini all" - ] -} diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/public/favicon.ico b/packages/cli/templates/react/igr-es6/projects/_base/files/public/favicon.ico deleted file mode 100644 index a11777cc4..000000000 Binary files a/packages/cli/templates/react/igr-es6/projects/_base/files/public/favicon.ico and /dev/null differ diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/public/index.html b/packages/cli/templates/react/igr-es6/projects/_base/files/public/index.html deleted file mode 100644 index 99218b297..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/public/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - IgniteUI for React - - - -
- - - diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/public/manifest.json b/packages/cli/templates/react/igr-es6/projects/_base/files/public/manifest.json deleted file mode 100644 index 27c95fff2..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/public/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "short_name": "$(name)", - "name": "$(name)", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/src/App.test.js b/packages/cli/templates/react/igr-es6/projects/_base/files/src/App.test.js deleted file mode 100644 index a754b201b..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/src/App.test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import App from './App'; - -it('renders without crashing', () => { - const div = document.createElement('div'); - ReactDOM.render(, div); - ReactDOM.unmountComponentAtNode(div); -}); diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/src/hoc/asyncComponent.js b/packages/cli/templates/react/igr-es6/projects/_base/files/src/hoc/asyncComponent.js deleted file mode 100644 index 560f734e4..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/src/hoc/asyncComponent.js +++ /dev/null @@ -1,50 +0,0 @@ -import React, {Component} from 'react'; - -// https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html -const makeCancelable = (promise) => { - let hasCanceled_ = false; - - const wrappedPromise = new Promise((resolve, reject) => { - promise.then( - val => hasCanceled_ ? reject({isCanceled: true}) : resolve(val), - error => hasCanceled_ ? reject({isCanceled: true}) : reject(error) - ); - }); - - return { - promise: wrappedPromise, - cancel() { - hasCanceled_ = true; - }, - }; - }; - -/** - * https://medium.com/front-end-weekly/loading-components-asynchronously-in-react-app-with-an-hoc-61ca27c4fda7 - * @param {function} importComponent - */ -const asyncComponent = (importComponent) => { - return class extends Component { - state = { - component: null - } - - componentDidMount() { - this.op = makeCancelable(importComponent()); - this.op.promise.then(cmp => { - this.setState({component: cmp.default}); - }); - } - - componentWillUnmount() { - this.op.cancel(); - } - - render() { - const C = this.state.component; - return C ? : null; - } - } -}; - -export default asyncComponent; \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/src/index.css b/packages/cli/templates/react/igr-es6/projects/_base/files/src/index.css deleted file mode 100644 index cee5f348f..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/src/index.css +++ /dev/null @@ -1,14 +0,0 @@ -body { - margin: 0; - padding: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", - "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", - monospace; -} diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/src/index.js b/packages/cli/templates/react/igr-es6/projects/_base/files/src/index.js deleted file mode 100644 index 6d01b8ab3..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/src/index.js +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import './index.css'; -import App from './App'; -import * as serviceWorker from './serviceWorker'; -import 'react-app-polyfill/ie11'; - -/** Required in IE11 for Charts */ -Number.isNaN = Number.isNaN || function(value) { - // eslint-disable-next-line - return value !== value; -} - -ReactDOM.render(, document.getElementById('root')); - -// If you want your app to work offline and load faster, you can change -// unregister() to register() below. Note this comes with some pitfalls. -// Learn more about service workers: http://bit.ly/CRA-PWA -serviceWorker.unregister(); diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/src/routes.json b/packages/cli/templates/react/igr-es6/projects/_base/files/src/routes.json deleted file mode 100644 index 62ca363d6..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/src/routes.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "path": "/", - "componentPath": "./views/home", - "text": "Home" - } -] diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/src/serviceWorker.js b/packages/cli/templates/react/igr-es6/projects/_base/files/src/serviceWorker.js deleted file mode 100644 index 2283ff9ce..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/src/serviceWorker.js +++ /dev/null @@ -1,135 +0,0 @@ -// This optional code is used to register a service worker. -// register() is not called by default. - -// This lets the app load faster on subsequent visits in production, and gives -// it offline capabilities. However, it also means that developers (and users) -// will only see deployed updates on subsequent visits to a page, after all the -// existing tabs open on the page have been closed, since previously cached -// resources are updated in the background. - -// To learn more about the benefits of this model and instructions on how to -// opt-in, read http://bit.ly/CRA-PWA - -const isLocalhost = Boolean( - window.location.hostname === 'localhost' || - // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || - // 127.0.0.1/8 is considered localhost for IPv4. - window.location.hostname.match( - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ - ) -); - -export function register(config) { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { - // The URL constructor is available in all browsers that support SW. - const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); - if (publicUrl.origin !== window.location.origin) { - // Our service worker won't work if PUBLIC_URL is on a different origin - // from what our page is served on. This might happen if a CDN is used to - // serve assets; see https://github.com/facebook/create-react-app/issues/2374 - return; - } - - window.addEventListener('load', () => { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - - if (isLocalhost) { - // This is running on localhost. Let's check if a service worker still exists or not. - checkValidServiceWorker(swUrl, config); - - // Add some additional logging to localhost, pointing developers to the - // service worker/PWA documentation. - navigator.serviceWorker.ready.then(() => { - console.log( - 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit http://bit.ly/CRA-PWA' - ); - }); - } else { - // Is not localhost. Just register service worker - registerValidSW(swUrl, config); - } - }); - } -} - -function registerValidSW(swUrl, config) { - navigator.serviceWorker - .register(swUrl) - .then(registration => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - if (installingWorker == null) { - return; - } - installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { - if (navigator.serviceWorker.controller) { - // At this point, the updated precached content has been fetched, - // but the previous service worker will still serve the older - // content until all client tabs are closed. - console.log( - 'New content is available and will be used when all ' + - 'tabs for this page are closed. See http://bit.ly/CRA-PWA.' - ); - - // Execute callback - if (config && config.onUpdate) { - config.onUpdate(registration); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); - - // Execute callback - if (config && config.onSuccess) { - config.onSuccess(registration); - } - } - } - }; - }; - }) - .catch(error => { - console.error('Error during service worker registration:', error); - }); -} - -function checkValidServiceWorker(swUrl, config) { - // Check if the service worker can be found. If it can't reload the page. - fetch(swUrl) - .then(response => { - // Ensure service worker exists, and that we really are getting a JS file. - const contentType = response.headers.get('content-type'); - if ( - response.status === 404 || - (contentType != null && contentType.indexOf('javascript') === -1) - ) { - // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then(registration => { - registration.unregister().then(() => { - window.location.reload(); - }); - }); - } else { - // Service worker found. Proceed as normal. - registerValidSW(swUrl, config); - } - }) - .catch(() => { - console.log( - 'No internet connection found. App is running in offline mode.' - ); - }); -} - -export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready.then(registration => { - registration.unregister(); - }); - } -} diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/src/views/home/index.js b/packages/cli/templates/react/igr-es6/projects/_base/files/src/views/home/index.js deleted file mode 100644 index 326cb03ae..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/src/views/home/index.js +++ /dev/null @@ -1,27 +0,0 @@ -import React, { Component } from 'react'; -import logo from './logo.svg'; -import styles from './style.css'; - -export default class Home extends Component { - state = { - } - - render () { - return ( -
- logo -

- Welcome to Ignite UI for React! -

- - Learn More - -
- ) - } -} diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/src/views/home/logo.svg b/packages/cli/templates/react/igr-es6/projects/_base/files/src/views/home/logo.svg deleted file mode 100644 index 6b60c1042..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/src/views/home/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/src/views/home/style.css b/packages/cli/templates/react/igr-es6/projects/_base/files/src/views/home/style.css deleted file mode 100644 index 304d9b24e..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/src/views/home/style.css +++ /dev/null @@ -1,28 +0,0 @@ -/* CSS Modules https://medium.com/@pioul/modular-css-with-react-61638ae9ea3e */ -:local(.logo) { - animation: App-logo-spin infinite 20s linear; - height: 40vmin; -} - -:local(.header) { - padding-top: 5em; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: #333; -} - -:local(.link) { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/projects/_base/index.ts b/packages/cli/templates/react/igr-es6/projects/_base/index.ts deleted file mode 100644 index f60404797..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/index.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { ControlExtraConfiguration, defaultDelimiters, ProjectTemplate, Util } from "@igniteui/cli-core"; -import * as path from "path"; - -export class BaseIgrProject implements ProjectTemplate { - public id: string = "base"; - public name = "base"; - public description = "Ignite UI CLI project for React"; - public framework: string = "react"; - public projectType: string = "jsx"; - public dependencies: string[]; - public hasExtraConfiguration: boolean = false; - public delimiters = defaultDelimiters; - - public get templatePaths(): string[] { - return [path.join(__dirname, "files")]; - } - - public generateConfig(name: string, theme: string, ...options: any[]): {[key: string]: any} { - return this.getVariablesConfig(name, theme); - } - - public installModules(): void { - throw new Error("Method not implemented."); - } - public async upgradeIgniteUIPackages(projectPath: string, packagePath: string): Promise { - throw new Error("Method not implemented."); - } - public getExtraConfiguration(): ControlExtraConfiguration[] { - throw new Error("Method not implemented."); - } - public setExtraConfiguration(extraConfigKeys: {}) { - throw new Error("Method not implemented."); - } - - protected getVariablesConfig(name: string, theme: string) { - return { - name, - theme, - "cliVersion": Util.version(), - "dash-name": Util.lowerDashed(name), - "description": this.description, - "dot": ".", - "path": name, - "projectTemplate": this.id - }; - } -} diff --git a/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/App.css b/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/App.css deleted file mode 100644 index fd9528478..000000000 --- a/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/App.css +++ /dev/null @@ -1,59 +0,0 @@ -.app { - text-align: center; - display: flex; - flex-flow: column; - min-height: 100vh; - } - - .content { - flex: 1 0 auto; - padding: 1em; - } - - /* quick nav menubar */ - nav, .app__name { - background-color: rgb(0, 153, 255); - box-sizing: border-box; - } - .app__name { - font-weight: 600; - font-size: 24px; - line-height: 32px; - padding-left: 24px; - text-align: left; - color: #FFF; - padding-bottom: 8px; - } - - nav ul { - list-style: none; - display: flex; - justify-content: flex-start; - flex-wrap: wrap; - margin: 0; - padding: 0; - } - - nav ul a { - color: #fff; - line-height: 2; - text-decoration: none; - margin: 0 5px; - } - - nav ul a.active { - color: #fff; - font-weight: 600; - } - nav ul li { - margin: 0px 16px; - box-sizing: border-box; - border-bottom: 1px solid transparent; - } - nav ul li.active { - border-bottom: 2px solid #fff; - } - nav ul li:not(.active):hover { - border-bottom: 1px solid #fff; - } - \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/App.js b/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/App.js deleted file mode 100644 index c120a8c9d..000000000 --- a/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/App.js +++ /dev/null @@ -1,36 +0,0 @@ -import React, { Component } from "react"; -import { Route, BrowserRouter as Router, Switch } from "react-router-dom"; -import asyncComponent from "./hoc/asyncComponent"; -import NavigationHeader from "./components/navigation-header/index"; -import routes from "./routes.json"; -import "./App.css"; - -class App extends Component { - name = "$(name)"; - render() { - return ( - -
-
{this.name}
- -
- - {routes.map((route, i) => ( - - import("" + route.componentPath) - )} - /> - ))} - -
-
-
- ); - } -} - -export default App; diff --git a/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/components/navigation-header/index.js b/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/components/navigation-header/index.js deleted file mode 100644 index f951ab181..000000000 --- a/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/components/navigation-header/index.js +++ /dev/null @@ -1,37 +0,0 @@ -import React, { Component } from 'react'; -import { NavLink } from 'react-router-dom'; - -export default class NavigationHeader extends Component { - state = { - activeItem: null - } - - handleClick(index) { - this.setState({ - activeItem: index - }) - } - - componentWillMount() { - let currentRoute = window.location.href.split(window.location.origin)[1]; - if (!currentRoute) { - currentRoute = '/' - } - const activeItem = this.props.routes.findIndex((route) => route.path === currentRoute); - this.setState({ - activeItem - }); - } - - render() { - return ( - - ) - } -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/setupTests.js b/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/setupTests.js deleted file mode 100644 index acd71d494..000000000 --- a/packages/cli/templates/react/igr-es6/projects/top-nav/files/src/setupTests.js +++ /dev/null @@ -1,4 +0,0 @@ -import Enzyme from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16'; - -Enzyme.configure({ adapter: new Adapter() }); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/projects/top-nav/index.ts b/packages/cli/templates/react/igr-es6/projects/top-nav/index.ts deleted file mode 100644 index a9607ff77..000000000 --- a/packages/cli/templates/react/igr-es6/projects/top-nav/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ProjectTemplate } from "@igniteui/cli-core"; -import * as path from "path"; -import { BaseIgrProject } from "../_base"; - -export class TopNavIgrProject extends BaseIgrProject implements ProjectTemplate { - public id: string = "top-nav"; - public name = "Default top navigation"; - public description = "Project structure with top navigation menu"; - public dependencies: string[] = []; - public framework: string = "react"; - public projectType: string = "igr-es6"; - public hasExtraConfiguration: boolean = false; - - public get templatePaths(): string[] { - return [...super.templatePaths, path.join(__dirname, "files")]; - } -} -export default new TopNavIgrProject(); diff --git a/packages/cli/templates/react/igr-es6/radial-gauge/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/radial-gauge/default/files/src/views/__path__/index.js deleted file mode 100644 index b3ba47b90..000000000 --- a/packages/cli/templates/react/igr-es6/radial-gauge/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,66 +0,0 @@ -import React, { Component } from 'react'; -import style from './style.css'; -import { IgrRadialGaugeModule } from 'igniteui-react-gauges'; -import { IgrRadialGauge } from 'igniteui-react-gauges'; - -IgrRadialGaugeModule.register(); - - -export default class $(ClassName) extends Component { - title = 'Radial Gauge' - state = { - data: [] - }; - - render() { - return ( -
-

{this.title}

-
- Read more on the  - - official documentation page - -
-
-
- - -
-
- - -
-
-
- ) - } -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/radial-gauge/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/radial-gauge/default/files/src/views/__path__/style.css deleted file mode 100644 index 8ccb6dae7..000000000 --- a/packages/cli/templates/react/igr-es6/radial-gauge/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,12 +0,0 @@ -:local(.container) { - display: flex; - flex-flow: row; - justify-content: space-around; -} - -:local(.title) { - color: rgb(0, 153, 255); -} -:local(.gauge) { - width: 50%; -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/radial-gauge/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/radial-gauge/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/radial-gauge/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/radial-gauge/default/index.ts b/packages/cli/templates/react/igr-es6/radial-gauge/default/index.ts deleted file mode 100644 index 0b674865e..000000000 --- a/packages/cli/templates/react/igr-es6/radial-gauge/default/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrRadialGaugeTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Radial Gauge"]; - this.controlGroup = "Gauges"; - this.listInComponentTemplates = true; - this.id = "radial-gauge"; - this.projectType = "igr-es6"; - this.name = "Radial Gauge"; - this.description = `provides a number of visual elements, like a needle, tick marks, ranges - and labels, in order to create a predefined shape and scale.`; - this.packages = ["igniteui-react-gauges@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrRadialGaugeTemplate(); diff --git a/packages/cli/templates/react/igr-es6/radial-gauge/index.ts b/packages/cli/templates/react/igr-es6/radial-gauge/index.ts deleted file mode 100644 index ff8c59949..000000000 --- a/packages/cli/templates/react/igr-es6/radial-gauge/index.ts +++ /dev/null @@ -1,16 +0,0 @@ - -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrRadialGaugeComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Radial Gauge"; - this.group = "Gauges"; - this.description = `provides a number of visual elements, like a needle, tick marks, ranges - and labels, in order to create a predefined shape and scale.`; - } -} -module.exports = new IgrRadialGaugeComponent(); diff --git a/packages/cli/templates/react/igr-ts/index.ts b/packages/cli/templates/react/igr-ts/index.ts index f76625550..25b9b5d36 100644 --- a/packages/cli/templates/react/igr-ts/index.ts +++ b/packages/cli/templates/react/igr-ts/index.ts @@ -3,7 +3,7 @@ import { BaseProjectLibrary } from "@igniteui/cli-core"; class IgrTsReactProjectLibrary extends BaseProjectLibrary { constructor() { super(__dirname); - this.name = "Ignite UI for React TS"; + this.name = "Ignite UI for React"; this.projectType = "igr-ts"; this.themes = ["default"]; diff --git a/packages/cli/templates/react/index.ts b/packages/cli/templates/react/index.ts index ef09af1cc..7b8e8d1a4 100644 --- a/packages/cli/templates/react/index.ts +++ b/packages/cli/templates/react/index.ts @@ -9,7 +9,6 @@ class ReactFramework implements Framework { this.id = "react"; this.name = "React"; this.projectLibraries = []; - this.projectLibraries.push(require("./igr-es6") as ProjectLibrary); this.projectLibraries.push(require("./igr-ts") as ProjectLibrary); } } diff --git a/packages/core/util/Util.ts b/packages/core/util/Util.ts index ee80fc0b5..389b99a2e 100644 --- a/packages/core/util/Util.ts +++ b/packages/core/util/Util.ts @@ -430,18 +430,12 @@ export class Util { } public static getAvailableName( - defaultName: string, isApp: boolean, framework?: string, projectType?: string): string { + defaultName: string, isApp: boolean, framework?: string, _projectType?: string): string { const baseLength = defaultName.length; let specificPath = ""; - if (framework === "angular" && projectType === "igx-ts") { - specificPath = path.join("src", "app"); - } else if (framework === "react" && projectType === "igr-es6") { - specificPath = path.join("src", "views"); - } else if (framework === "react" && projectType === "igr-ts") { - specificPath = path.join("src", "app"); - } else if (framework === "webcomponents" && projectType === "igc-ts") { + if (["angular", "react", "webcomponents"].includes(framework)) { specificPath = path.join("src", "app"); } diff --git a/spec/unit/start-spec.ts b/spec/unit/start-spec.ts index ca47bd0fa..b979c37c9 100644 --- a/spec/unit/start-spec.ts +++ b/spec/unit/start-spec.ts @@ -56,13 +56,13 @@ describe("Unit - start command", () => { expect(Util.error).not.toHaveBeenCalled(); }); - it("Starts a React igr-es6 project", async () => { + it("Starts a React project", async () => { spyOn(ProjectConfig, "hasLocalConfig").and.returnValue(true); // tslint:disable-next-line:no-object-literal-type-assertion const config: Config = { project: { framework: "react", - projectType: "igr-es6" + projectType: "igr-ts" } } as Config; spyOn(ProjectConfig, "getConfig").and.callFake(() => config); @@ -74,12 +74,10 @@ describe("Unit - start command", () => { config.project.defaultPort = 3567; await startCmd.handler({ _: ["start"], $0: "start" }); - expect(process.env.PORT).toEqual("3567"); - expect(Util.execSync).toHaveBeenCalledWith("npm start", { stdio: "inherit", killSignal: "SIGINT" }); + expect(Util.execSync).toHaveBeenCalledWith("npm start -- --port=3567", { stdio: "inherit", killSignal: "SIGINT" }); await startCmd.handler({ port: 1234, _: ["start"], $0: "start" }); - expect(process.env.PORT).toEqual("1234"); - expect(Util.execSync).toHaveBeenCalledWith("npm start", { stdio: "inherit", killSignal: "SIGINT" }); + expect(Util.execSync).toHaveBeenCalledWith("npm start -- --port=1234", { stdio: "inherit", killSignal: "SIGINT" }); expect(Util.error).not.toHaveBeenCalled(); }); @@ -103,7 +101,6 @@ describe("Unit - start command", () => { const config: Config = { project: { framework: "jquery", - projectType: "igr-es6" } } as Config; spyOn(ProjectConfig, "getConfig").and.callFake(() => config);