igniteui-cli 14.0.0-beta.1 → 14.0.0-beta.3
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/lib/commands/upgrade.js +1 -1
- package/lib/templates/AngularTemplate.js +2 -10
- package/package.json +3 -3
- package/templates/react/ReactTypeScriptFileUpdate.d.ts +1 -0
- package/templates/react/ReactTypeScriptFileUpdate.js +1 -0
- package/templates/react/igr-ts/projects/_base/files/src/app/app-routes.tsx +2 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/app/app.test.tsx +14 -0
- package/templates/webcomponents/WebComponentsTypeScriptFileUpdate.d.ts +3 -2
- package/templates/webcomponents/WebComponentsTypeScriptFileUpdate.js +2 -2
- package/templates/webcomponents/igc-ts/projects/_base/files/__dot__eslintrc.json +2 -1
- package/templates/webcomponents/igc-ts/projects/_base/files/src/app/app.test.ts +9 -0
- package/templates/webcomponents/igc-ts/projects/_base/files/src/app/app.ts +1 -1
package/lib/commands/upgrade.js
CHANGED
|
@@ -59,7 +59,7 @@ command = {
|
|
|
59
59
|
if (success && !argv.skipInstall) {
|
|
60
60
|
cli_core_1.Util.log("Installing npm packages.");
|
|
61
61
|
try {
|
|
62
|
-
cli_core_1.Util.execSync("npm install --
|
|
62
|
+
cli_core_1.Util.execSync("npm install --quiet");
|
|
63
63
|
cli_core_1.Util.log("npm packages installed.");
|
|
64
64
|
}
|
|
65
65
|
catch (error) {
|
|
@@ -55,11 +55,7 @@ class AngularTemplate {
|
|
|
55
55
|
modulePath: cli_core_1.Util.relativePath(routingModulePath, componentPath, true, true),
|
|
56
56
|
data: { text: cli_core_1.Util.nameFromPath(name) }
|
|
57
57
|
});
|
|
58
|
-
|
|
59
|
-
if (content) {
|
|
60
|
-
// add to a finalize override in the NG File Update instead?
|
|
61
|
-
cli_core_1.TypeScriptUtils.saveFile(routingModulePath, content);
|
|
62
|
-
}
|
|
58
|
+
routingModule.finalize();
|
|
63
59
|
}
|
|
64
60
|
//3) add an import of the component class from its file location.
|
|
65
61
|
//4) populate the declarations portion of the @NgModule with the component class name.
|
|
@@ -71,11 +67,7 @@ class AngularTemplate {
|
|
|
71
67
|
from: relativePath,
|
|
72
68
|
export: modulePath !== "app.module.ts" ? [className] : []
|
|
73
69
|
});
|
|
74
|
-
|
|
75
|
-
if (content) {
|
|
76
|
-
// add to a finalize override in the NG File Update instead?
|
|
77
|
-
cli_core_1.TypeScriptUtils.saveFile(mainModulePath, content);
|
|
78
|
-
}
|
|
70
|
+
mainModule.finalize();
|
|
79
71
|
this.ensureSourceFiles(projectPath);
|
|
80
72
|
}
|
|
81
73
|
getExtraConfiguration() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-cli",
|
|
3
|
-
"version": "14.0.0-beta.
|
|
3
|
+
"version": "14.0.0-beta.3",
|
|
4
4
|
"description": "CLI tool for creating Ignite UI projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"all": true
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@igniteui/angular-templates": "~18.
|
|
76
|
-
"@igniteui/cli-core": "~14.0.0-beta.
|
|
75
|
+
"@igniteui/angular-templates": "~18.1.1400-beta.3",
|
|
76
|
+
"@igniteui/cli-core": "~14.0.0-beta.3",
|
|
77
77
|
"chalk": "^2.3.2",
|
|
78
78
|
"fs-extra": "^3.0.1",
|
|
79
79
|
"glob": "^7.1.2",
|
|
@@ -2,6 +2,7 @@ import * as ts from 'typescript';
|
|
|
2
2
|
import { FormatSettings, PropertyAssignment, RouteEntry, TypeScriptFileUpdate } from '@igniteui/cli-core';
|
|
3
3
|
import { ReactRouteLike } from './types';
|
|
4
4
|
export declare class ReactTypeScriptFileUpdate extends TypeScriptFileUpdate {
|
|
5
|
+
readonly filePath: string;
|
|
5
6
|
constructor(filePath: string, formatSettings?: FormatSettings, compilerOptions?: ts.CompilerOptions);
|
|
6
7
|
addRoute(route: ReactRouteLike, multiline?: boolean, prepend?: boolean, anchorElement?: PropertyAssignment): void;
|
|
7
8
|
protected buildRouteStructure(route: ReactRouteLike, _multiline: boolean): RouteEntry[];
|
|
@@ -7,6 +7,7 @@ const types_1 = require("./types");
|
|
|
7
7
|
class ReactTypeScriptFileUpdate extends cli_core_1.TypeScriptFileUpdate {
|
|
8
8
|
constructor(filePath, formatSettings, compilerOptions) {
|
|
9
9
|
super(filePath, formatSettings, compilerOptions);
|
|
10
|
+
this.filePath = filePath;
|
|
10
11
|
}
|
|
11
12
|
//#region Overridden Public API
|
|
12
13
|
addRoute(route, multiline = false, prepend = false, anchorElement) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { expect, test } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { MemoryRouter } from 'react-router-dom';
|
|
4
|
+
import App from './app';
|
|
5
|
+
import 'element-internals-polyfill';
|
|
6
|
+
|
|
7
|
+
test('renders without crashing', () => {
|
|
8
|
+
const wrapper = render(
|
|
9
|
+
<MemoryRouter>
|
|
10
|
+
<App />
|
|
11
|
+
</MemoryRouter>);
|
|
12
|
+
|
|
13
|
+
expect(wrapper).toBeTruthy();
|
|
14
|
+
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as ts from 'typescript';
|
|
1
2
|
import { FormatSettings, PropertyAssignment, RouteEntry, RouteLike, TypeScriptFileUpdate } from '@igniteui/cli-core';
|
|
2
3
|
export declare class WebComponentsTypeScriptFileUpdate extends TypeScriptFileUpdate {
|
|
3
|
-
filePath: string;
|
|
4
|
-
constructor(filePath: string, formatSettings?: FormatSettings);
|
|
4
|
+
readonly filePath: string;
|
|
5
|
+
constructor(filePath: string, formatSettings?: FormatSettings, compilerOptions?: ts.CompilerOptions);
|
|
5
6
|
addRoute(route: RouteLike, multiline?: boolean, prepend?: boolean, anchorElement?: PropertyAssignment): void;
|
|
6
7
|
protected buildRouteStructure(route: RouteLike, _multiline: boolean): RouteEntry[];
|
|
7
8
|
}
|
|
@@ -4,8 +4,8 @@ exports.WebComponentsTypeScriptFileUpdate = void 0;
|
|
|
4
4
|
const ts = require("typescript");
|
|
5
5
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
6
6
|
class WebComponentsTypeScriptFileUpdate extends cli_core_1.TypeScriptFileUpdate {
|
|
7
|
-
constructor(filePath, formatSettings) {
|
|
8
|
-
super(filePath, formatSettings);
|
|
7
|
+
constructor(filePath, formatSettings, compilerOptions) {
|
|
8
|
+
super(filePath, formatSettings, compilerOptions);
|
|
9
9
|
this.filePath = filePath;
|
|
10
10
|
}
|
|
11
11
|
//#region Overridden Public API
|
|
@@ -4,7 +4,7 @@ import { customElement } from 'lit/decorators.js';
|
|
|
4
4
|
import { routes } from './app-routing.js';
|
|
5
5
|
|
|
6
6
|
@customElement('app-root')
|
|
7
|
-
export class App extends LitElement {
|
|
7
|
+
export default class App extends LitElement {
|
|
8
8
|
static styles = css`
|
|
9
9
|
router-outlet {
|
|
10
10
|
width: 100%;
|