Skip to content

Commit 502ab5c

Browse files
authored
Merge pull request #1551 from IgniteUI/dpetev/remove-react-igr-es6
refactor(igr): remove deprecated igr-es6 project type
1 parent 6992f2e commit 502ab5c

File tree

78 files changed

+16
-1754
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+16
-1754
lines changed

.vscode/cSpell.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// cSpell Settings
21
{
3-
// Version of the setting file. Always 0.1
4-
"version": "0.1",
52
// language - current active spelling language
63
"language": "en",
74
// words - list of words to be always considered correct
85
"words": [
6+
"igniteui",
97
"infragistics",
10-
"igniteui"
8+
"webcomponents"
119
],
1210
// flagWords - list of words to be always considered incorrect
1311
// This is useful for offensive words and common spelling errors.

.vscode/launch.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,6 @@
109109
"console": "externalTerminal",
110110
"preLaunchTask": "build",
111111
"outFiles": ["${workspaceFolder}/**/*.js"],
112-
"args": [
113-
"new",
114-
"reactproj",
115-
"--framework=react"
116-
]
117-
},
118-
{
119-
"type": "node",
120-
"request": "launch",
121-
"name": "Launch New React TS ES6",
122-
"cwd": "${workspaceRoot}/output",
123-
"program": "${workspaceRoot}/packages/cli/bin/execute.js",
124-
"console": "externalTerminal",
125-
"preLaunchTask": "build",
126-
"outFiles": ["${workspaceFolder}/**/*.js"],
127112
"args": [
128113
"new",
129114
"reactproj",

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ ig new "IG Project" --framework=angular --type=igx-ts --template=side-nav
101101
```
102102
#### Generate Ignite UI for React project
103103

104-
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:
104+
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:
105105
```bash
106-
ig new "IG Project" --framework=react --type=igr-es6
106+
ig new "IG Project" --framework=react --type=igr-ts
107107
```
108108
#### Generate Ignite UI for Web Components project
109109

packages/cli/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ The `igniteui-cli` makes full use of the component definitions provided by [`ign
7979

8080
#### Generate Ignite UI for React project
8181

82-
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:
82+
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:
8383
```bash
84-
ig new "IG Project" --framework=react --type=igr-es6
84+
ig new "IG Project" --framework=react --type=igr-ts
8585
```
8686

8787
#### Adding components

packages/cli/lib/commands/start.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const command: StartCommandType = {
6565
cd14: config.project.theme
6666
});
6767

68-
let port = Number(argv.port) || defaultPort;
68+
const port = Number(argv.port) || defaultPort;
6969
// TODO: consider piping the stdin so that we handle the cp's termination
7070
// this may require additional logic to be implemented if the cp asks for input
7171
const options: ExecSyncOptions = { stdio: "inherit", killSignal: "SIGINT" };
@@ -82,23 +82,11 @@ const command: StartCommandType = {
8282

8383
browserSync.init(bsConfig);
8484
break;
85-
case "react":
86-
if (port) {
87-
if (projectType === "igr-ts") {
88-
execSyncNpmStart(port, options);
89-
} else {
90-
// https://facebook.github.io/create-react-app/docs/advanced-configuration
91-
// react-scripts start "--port=dafaultPort" is not a valid command for all environments.
92-
// .env file is included and used by both igr-es6 and es6 now,
93-
// to specify the port for all environments (Windows, Mac, etc)
94-
process.env.PORT = `${port}`;
95-
port = null;
96-
}
97-
}
98-
/* falls through */
9985
case "angular":
86+
case "react":
10087
case "webcomponents":
10188
execSyncNpmStart(port, options);
89+
break;
10290
default:
10391
break;
10492
}

packages/cli/lib/templates/IgniteUIForReactTemplate.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ export class IgniteUIForReactTemplate implements Template {
7272
options.parentRoutingModulePath = "src/app/app-routes.tsx";
7373
}
7474

75-
if (this.projectType === "igr-es6") {
76-
this.registerJSONRoute(projectPath, name, options.parentRoutingModulePath);
77-
return;
78-
}
79-
8075
const routeModulePath: string = options.parentRoutingModulePath;
8176

8277
if (!(options && options.skipRoute)
@@ -148,27 +143,4 @@ export class IgniteUIForReactTemplate implements Template {
148143
const name = Util.nameFromPath(pathName);
149144
return Util.lowerDashed(name);
150145
}
151-
152-
protected registerJSONRoute(projectPath: string, name: string, routingModulePath: string) {
153-
const configFile = fs.readFileSync(path.join(projectPath, routingModulePath), "utf8");
154-
const viewsArr = JSON.parse(configFile);
155-
viewsArr.push({
156-
componentPath: this.getViewLink(name),
157-
path: "/" + this.folderName(Util.nameFromPath(name)),
158-
text: this.getToolbarLink(name)
159-
});
160-
161-
fs.writeFileSync(path.join(projectPath, routingModulePath), JSON.stringify(viewsArr, null, 4));
162-
}
163-
164-
protected getViewLink(name: string): string {
165-
const filePath = "./views/" + this.folderName(name);
166-
return filePath;
167-
}
168-
169-
protected getToolbarLink(name: string): string {
170-
name = Util.nameFromPath(name);
171-
const toolbarLink = name.replace(/\w\S*/g, txt => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
172-
return toolbarLink;
173-
}
174146
}

packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/index.js

Lines changed: 0 additions & 62 deletions
This file was deleted.

packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/style.css

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/test.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

packages/cli/templates/react/igr-es6/bullet-graph/default/index.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)