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.
@@ -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 --force --quiet");
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
- const content = routingModule.finalize();
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
- const content = mainModule.finalize();
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.1",
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.0.1400-beta.1",
76
- "@igniteui/cli-core": "~14.0.0-beta.1",
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) {
@@ -1,3 +1,5 @@
1
+
2
+
1
3
  export const routes = [
2
4
 
3
5
  ];
@@ -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
@@ -18,6 +18,7 @@
18
18
  "@typescript-eslint"
19
19
  ],
20
20
  "rules": {
21
- "@typescript-eslint/no-inferrable-types": "off"
21
+ "@typescript-eslint/no-inferrable-types": "off",
22
+ "@typescript-eslint/no-explicit-any": "off"
22
23
  }
23
24
  }
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import App from './app.js';
3
+
4
+ describe('App', () => {
5
+ it('<app-root> is an instance of App', async () => {
6
+ const element = document.createElement('app-root');
7
+ expect(element).to.be.instanceOf(App);
8
+ });
9
+ });
@@ -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%;