igniteui-cli 14.3.7 → 14.3.8-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.
Files changed (29) hide show
  1. package/package.json +3 -3
  2. package/templates/angular/ig-ts/line-chart/default/files/src/app/assets/line-chart-data.ts +1 -1
  3. package/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/index.js +2 -2
  4. package/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/index.js +2 -2
  5. package/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/index.js +2 -2
  6. package/templates/react/igr-ts/category-chart/default/files/src/app/__path__/__filePrefix__.tsx +1 -1
  7. package/templates/react/igr-ts/doughnut-chart/default/files/src/app/__path__/__filePrefix__.tsx +3 -3
  8. package/templates/react/igr-ts/financial-chart/default/files/src/app/__path__/__filePrefix__.tsx +1 -1
  9. package/templates/react/igr-ts/pie-chart/default/files/src/app/__path__/__filePrefix__.tsx +3 -3
  10. package/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/github-pages.yml +3 -1
  11. package/templates/react/igr-ts/projects/_base/files/eslint.config.mjs +48 -0
  12. package/templates/react/igr-ts/projects/_base/files/package.json +3 -3
  13. package/templates/react/igr-ts/projects/_base/files/vite.config.ts +8 -1
  14. package/templates/react/igr-ts/projects/top-nav/files/src/components/navigation-header/index.tsx +4 -4
  15. package/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/DataGridSharedData.ts +0 -1
  16. package/templates/webcomponents/igc-ts/grid/grid-summaries/files/src/app/__path__/NwindData.ts +0 -1
  17. package/templates/webcomponents/igc-ts/grid/grid-summaries/files/src/app/__path__/__filePrefix__.ts +1 -11
  18. package/templates/webcomponents/igc-ts/navbar/default/files/src/app/__path__/__filePrefix__.ts +1 -3
  19. package/templates/webcomponents/igc-ts/projects/_base/files/__dot__github/workflows/github-pages.yml +2 -6
  20. package/templates/webcomponents/igc-ts/projects/_base/files/eslint.config.mjs +37 -0
  21. package/templates/webcomponents/igc-ts/projects/_base/files/package.json +13 -19
  22. package/templates/webcomponents/igc-ts/projects/_base/files/src/app/models/css.d.ts +5 -0
  23. package/templates/webcomponents/igc-ts/projects/_base/files/tsconfig.json +3 -3
  24. package/templates/webcomponents/igc-ts/projects/_base/files/vite.config.ts +53 -0
  25. package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +12 -18
  26. package/templates/webcomponents/igc-ts/projects/side-nav/files/src/app/app.ts +0 -1
  27. package/templates/react/igr-ts/projects/_base/files/__dot__eslintrc.cjs +0 -31
  28. package/templates/webcomponents/igc-ts/projects/_base/files/__dot__eslintrc.json +0 -24
  29. package/templates/webcomponents/igc-ts/projects/_base/files/rollup.config.mjs +0 -95
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "igniteui-cli",
3
- "version": "14.3.7",
3
+ "version": "14.3.8-beta.3",
4
4
  "description": "CLI tool for creating Ignite UI projects",
5
5
  "keywords": [
6
6
  "CLI",
@@ -70,8 +70,8 @@
70
70
  "all": true
71
71
  },
72
72
  "dependencies": {
73
- "@igniteui/angular-templates": "~19.0.1437",
74
- "@igniteui/cli-core": "~14.3.7",
73
+ "@igniteui/angular-templates": "~19.1.1438-beta.3",
74
+ "@igniteui/cli-core": "~14.3.8-beta.3",
75
75
  "@inquirer/prompts": "^5.4.0",
76
76
  "@types/yargs": "^17.0.33",
77
77
  "chalk": "^5.3.0",
@@ -1,4 +1,4 @@
1
- const data = [
1
+ const data: any = [
2
2
  { "CountryName": "China", "Pop1995": 1216, "Pop2005": 1297, "Pop2015": 1361, "Pop2025": 1394 },
3
3
  { "CountryName": "India", "Pop1995": 920, "Pop2005": 1090, "Pop2015": 1251, "Pop2025": 1396 },
4
4
  { "CountryName": "United States", "Pop1995": 266, "Pop2005": 295, "Pop2015": 322, "Pop2025": 351 },
@@ -14,7 +14,7 @@ IgrDoughnutChartModule.register();
14
14
  IgrRingSeriesModule.register();
15
15
 
16
16
 
17
- const data = [
17
+ const data: any = [
18
18
  { MarketShare: 30, Company: "Google", },
19
19
  { MarketShare: 15, Company: "Microsoft", },
20
20
  { MarketShare: 30, Company: "Apple", },
@@ -82,4 +82,4 @@ export default class $(ClassName) extends Component {
82
82
  </div>
83
83
  )
84
84
  }
85
- }
85
+ }
@@ -5,7 +5,7 @@ import style from './style.css';
5
5
 
6
6
  IgrFinancialChartModule.register();
7
7
 
8
- const data = [
8
+ const data: any = [
9
9
  { time: new Date(2013, 1, 1), open: 268.93, high: 268.93, low: 262.80, close: 265.00, volume: 6118146 },
10
10
  { time: new Date(2013, 1, 4), open: 262.78, high: 264.68, low: 259.07, close: 259.98, volume: 3723793 },
11
11
  { time: new Date(2013, 1, 5), open: 262.00, high: 268.03, low: 261.46, close: 266.89, volume: 4013780 },
@@ -52,4 +52,4 @@ export default class $(ClassName) extends Component {
52
52
  </div >
53
53
  )
54
54
  }
55
- }
55
+ }
@@ -9,7 +9,7 @@ import style from './style.css';
9
9
  IgrPieChartModule.register();
10
10
  IgrItemLegendModule.register();
11
11
 
12
- const data = [
12
+ const data: any = [
13
13
  { MarketShare: 30, Company: "Google", },
14
14
  { MarketShare: 15, Company: "Microsoft", },
15
15
  { MarketShare: 30, Company: "Apple", },
@@ -80,4 +80,4 @@ export default class $(ClassName) extends Component {
80
80
  </div>
81
81
  )
82
82
  }
83
- }
83
+ }
@@ -5,7 +5,7 @@ import style from './style.module.css';
5
5
 
6
6
  IgrCategoryChartModule.register();
7
7
 
8
- const data = [
8
+ const data: any = [
9
9
  { 'CountryName': 'China', 'Pop1995': 1216, 'Pop2005': 1297, 'Pop2015': 1361, 'Pop2025': 1394 },
10
10
  { 'CountryName': 'India', 'Pop1995': 920, 'Pop2005': 1090, 'Pop2015': 1251, 'Pop2025': 1396 },
11
11
  { 'CountryName': 'United States', 'Pop1995': 266, 'Pop2005': 295, 'Pop2015': 322, 'Pop2025': 351 },
@@ -13,7 +13,7 @@ IgrDoughnutChartModule.register();
13
13
  IgrRingSeriesModule.register();
14
14
 
15
15
 
16
- const data = [
16
+ const data: any = [
17
17
  { MarketShare: 30, Company: "Google", },
18
18
  { MarketShare: 15, Company: "Microsoft", },
19
19
  { MarketShare: 30, Company: "Apple", },
@@ -24,8 +24,8 @@ const data = [
24
24
  export default function $(ClassName)() {
25
25
  const title = 'Doughnut Chart';
26
26
  const [chartData, setChartData] = useState([]);
27
- const legendRef = useRef();
28
- const chartRef = useRef();
27
+ const legendRef: any = useRef();
28
+ const chartRef: any = useRef();
29
29
 
30
30
  useEffect(() => {
31
31
  setChartData(data);
@@ -5,7 +5,7 @@ import style from './style.module.css';
5
5
 
6
6
  IgrFinancialChartModule.register();
7
7
 
8
- const data = [
8
+ const data: any = [
9
9
  { time: new Date(2013, 1, 1), open: 268.93, high: 268.93, low: 262.80, close: 265.00, volume: 6118146 },
10
10
  { time: new Date(2013, 1, 4), open: 262.78, high: 264.68, low: 259.07, close: 259.98, volume: 3723793 },
11
11
  { time: new Date(2013, 1, 5), open: 262.00, high: 268.03, low: 261.46, close: 266.89, volume: 4013780 },
@@ -8,7 +8,7 @@ import style from './style.module.css';
8
8
  IgrPieChartModule.register();
9
9
  IgrItemLegendModule.register();
10
10
 
11
- const data = [
11
+ const data: any = [
12
12
  { MarketShare: 30, Company: "Google", },
13
13
  { MarketShare: 15, Company: "Microsoft", },
14
14
  { MarketShare: 30, Company: "Apple", },
@@ -19,8 +19,8 @@ const data = [
19
19
  export default function $(ClassName)() {
20
20
  const title = 'Pie Chart';
21
21
  const [chartData, setChartData] = useState([]);
22
- const legendRef = useRef();
23
- const chartRef = useRef();
22
+ const legendRef: any = useRef();
23
+ const chartRef: any = useRef();
24
24
 
25
25
  useEffect(() => {
26
26
  setChartData(data);
@@ -35,7 +35,9 @@ jobs:
35
35
  run: echo "VITE_BASENAME=/${{ github.event.repository.name }}" >> $GITHUB_ENV
36
36
  - run: npm run build -- --base=/${{ github.event.repository.name }}/
37
37
  - name: Update Resource Paths
38
- run: find ./dist/assets -name "*.js" -exec sed -i 's|src/assets|${{ github.event.repository.name }}/assets|g' {} +
38
+ run: |
39
+ find ./dist/assets -type f -name "*.js" -exec sed -i 's|src/assets|${{ github.event.repository.name }}/assets|g' {} +;
40
+ find ./dist/assets -type f -name "*.js" -exec sed -i 's|/static-data/|/${{ github.event.repository.name }}/static-data/|g' {} +
39
41
  - name: Copy Resources to dist
40
42
  run: mkdir -p ./dist/assets && cp -R ./src/assets/* ./dist/assets/
41
43
  - name: SPA routing handling
@@ -0,0 +1,48 @@
1
+ import js from '@eslint/js';
2
+ import typescriptParser from '@typescript-eslint/parser';
3
+ import reactRefresh from 'eslint-plugin-react-refresh';
4
+ import { FlatCompat } from "@eslint/eslintrc";
5
+
6
+ const compat = new FlatCompat({
7
+ recommendedConfig: js.configs.recommended
8
+ });
9
+
10
+ export default [
11
+ ...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended'),
12
+ {
13
+ files: ['**/*.ts', '**/*.tsx'],
14
+ languageOptions: {
15
+ globals: {
16
+ browser: true,
17
+ es2020: true,
18
+ },
19
+ parser: typescriptParser,
20
+ parserOptions: {
21
+ ecmaVersion: 'latest',
22
+ sourceType: 'module',
23
+ },
24
+ },
25
+ plugins: {
26
+ reactRefresh
27
+ },
28
+ rules: {
29
+ '@typescript-eslint/no-unused-vars': [
30
+ 'error',
31
+ {
32
+ args: 'all',
33
+ argsIgnorePattern: '^_',
34
+ caughtErrors: 'all',
35
+ caughtErrorsIgnorePattern: '^_',
36
+ destructuredArrayIgnorePattern: '^(_|set)',
37
+ varsIgnorePattern: '^_',
38
+ ignoreRestSiblings: true,
39
+ },
40
+ ],
41
+ 'reactRefresh/only-export-components': ['warn', { allowConstantExport: true }],
42
+ '@typescript-eslint/no-explicit-any': 'off',
43
+ },
44
+ },
45
+ {
46
+ ignores: ['dist']
47
+ }
48
+ ];
@@ -21,8 +21,8 @@
21
21
  "@typescript-eslint/eslint-plugin": "^8.21.0",
22
22
  "@typescript-eslint/parser": "^8.21.0",
23
23
  "@vitejs/plugin-react": "^4.0.3",
24
- "eslint": "^8.57.0",
25
- "eslint-plugin-react-hooks": "^4.6.0",
24
+ "eslint": "^9.20.0",
25
+ "eslint-plugin-react-hooks": "^5.1.0",
26
26
  "eslint-plugin-react-refresh": "^0.4.3",
27
27
  "jsdom": "^22.1.0",
28
28
  "typescript": "~5.5.4",
@@ -34,7 +34,7 @@
34
34
  "start": "vite",
35
35
  "build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
36
36
  "preview": "vite preview",
37
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
37
+ "lint": "eslint . --report-unused-disable-directives --max-warnings 0",
38
38
  "test": "vitest"
39
39
  },
40
40
  "browserslist": [
@@ -4,13 +4,20 @@ import react from '@vitejs/plugin-react'
4
4
 
5
5
  // https://vitejs.dev/config/
6
6
  export default defineConfig({
7
+ build: {
8
+ chunkSizeWarningLimit: 10 * 1024 * 1024, // 10 MB
9
+ },
7
10
  plugins: [react()],
8
11
  test: {
9
12
  globals: true,
10
13
  environment: 'jsdom',
11
14
  setupFiles: ['./src/setupTests.ts'],
12
15
  deps: {
13
- inline: ['vitest-canvas-mock'],
16
+ optimizer: {
17
+ web: {
18
+ include: ['vitest-canvas-mock'],
19
+ },
20
+ },
14
21
  },
15
22
  },
16
23
  resolve: {
@@ -1,10 +1,10 @@
1
1
  import { useState, useEffect } from 'react';
2
2
  import { Link } from 'react-router-dom';
3
3
 
4
- export default function NavigationHeader({ routes }) {
4
+ export default function NavigationHeader({ routes }: any) {
5
5
  const [state, setState] = useState({ activeItem: null });
6
6
 
7
- function handleClick(index) {
7
+ function handleClick(index: any) {
8
8
  setState({ activeItem: index });
9
9
  }
10
10
 
@@ -13,7 +13,7 @@ export default function NavigationHeader({ routes }) {
13
13
  if (!currentRoute) {
14
14
  currentRoute = '/'
15
15
  }
16
- const activeItem = routes.findIndex((route) => route.path === currentRoute);
16
+ const activeItem = routes.findIndex((route: any) => route.path === currentRoute);
17
17
  setState({ activeItem });
18
18
  }, [routes]);
19
19
 
@@ -21,7 +21,7 @@ export default function NavigationHeader({ routes }) {
21
21
  <nav>
22
22
  <ul>
23
23
  {routes.map(
24
- (route, i) => <li key={i} className={state.activeItem === i ? 'active' : ''}><Link onClick={() => handleClick(i)} to={route.path}>{route.text}</Link></li>
24
+ (route: any, i: any) => <li key={i} className={state.activeItem === i ? 'active' : ''}><Link onClick={() => handleClick(i)} to={route.path}>{route.text}</Link></li>
25
25
  )}
26
26
  </ul>
27
27
  </nav>
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-param-reassign */
2
1
  export class DataGridSharedData {
3
2
  public static getEmployees(count?: number): any[] {
4
3
  if (count === undefined) {
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-param-reassign */
2
1
  export class NwindDataItem {
3
2
  public constructor(init: Partial<NwindDataItem>) {
4
3
  Object.assign(this, init);
@@ -1,10 +1,7 @@
1
1
  import { css, html, LitElement } from 'lit';
2
2
  import { customElement } from 'lit/decorators.js';
3
3
  import 'igniteui-webcomponents-grids/grids/combined';
4
- import {
5
- IgcGridComponent,
6
- IgcColumnComponent,
7
- } from 'igniteui-webcomponents-grids/grids';
4
+ import { IgcGridComponent } from 'igniteui-webcomponents-grids/grids';
8
5
  import {
9
6
  ComponentRenderer,
10
7
  WebGridDescriptionModule,
@@ -47,13 +44,6 @@ export default class $(ClassName) extends LitElement {
47
44
  const grid = this.shadowRoot?.getElementById('grid') as IgcGridComponent;
48
45
  const nwindData = NwindData;
49
46
 
50
- const productID = this.shadowRoot?.getElementById('ProductID') as IgcColumnComponent;
51
- const productName = this.shadowRoot?.getElementById('ProductName') as IgcColumnComponent;
52
- const unitPrice = this.shadowRoot?.getElementById('UnitPrice') as IgcColumnComponent;
53
- const unitsInStock = this.shadowRoot?.getElementById('UnitsInStock') as IgcColumnComponent;
54
- const discontinued = this.shadowRoot?.getElementById('Discontinued') as IgcColumnComponent;
55
- const orderDate = this.shadowRoot?.getElementById('OrderDate') as IgcColumnComponent;
56
-
57
47
  grid.data = new nwindData();
58
48
 
59
49
  const _componentRenderer = new ComponentRenderer();
@@ -4,10 +4,8 @@ import {
4
4
  defineComponents,
5
5
  IgcIconComponent,
6
6
  IgcNavbarComponent,
7
- } from 'igniteui-webcomponents';
8
- import {
9
7
  registerIcon,
10
- } from 'igniteui-webcomponents/components/icon/icon.registry';
8
+ } from 'igniteui-webcomponents';
11
9
 
12
10
  defineComponents(
13
11
  IgcIconComponent,
@@ -34,17 +34,13 @@ jobs:
34
34
  - name: Update Router Navigation
35
35
  run: |
36
36
  find ./src -type f -name "*.ts" -exec sed -i "s|Router.go(\`/|Router.go(\`/${{ github.event.repository.name }}/|g" {} \;
37
- find ./ -type f -name "rollup.config.mjs" -exec sed -i "s|navigateFallback: '/index.html'|navigateFallback: 'index.html'|g" {} \;
38
- - run: npm run build
37
+ find ./ -type f -name "vite.config.ts" -exec sed -i "s|navigateFallback: '/index.html'|navigateFallback: 'index.html'|g" {} \;
38
+ - run: npm run build -- --base=/${{ github.event.repository.name }}/
39
39
  - name: Update base href in index.html
40
40
  run: |
41
41
  sed -i 's|<base href="[^"]*">|<base href="/${{ github.event.repository.name }}/">|' ./dist/index.html
42
42
  - name: Update Resource Paths
43
43
  run: find ./dist -maxdepth 1 -type f ! -name 'sw*.js' ! -name 'workbox*.js' -name '*.js' -exec sed -i -e "s|/src/assets|/${{ github.event.repository.name }}/src/assets|g" -e "s|url('/src/assets|url('/${{ github.event.repository.name }}/src/assets|g" {} +
44
- - name: Copy ig-theme.css to dist
45
- run: cp ./ig-theme.css ./dist/
46
- - name: Update href Paths for ig-theme.css
47
- run: find ./dist -type f -exec sed -i "s|href=\"../../ig-theme.css\"|href=\"../../${{ github.event.repository.name }}/ig-theme.css\"|g" {} +
48
44
  - name: SPA routing handling
49
45
  run: cp ./dist/index.html ./dist/404.html
50
46
  - name: Upload build artifact to GitHub Pages
@@ -0,0 +1,37 @@
1
+ import js from '@eslint/js';
2
+ import typescriptParser from '@typescript-eslint/parser';
3
+ import tseslint from '@typescript-eslint/eslint-plugin';
4
+ import { FlatCompat } from "@eslint/eslintrc";
5
+
6
+ const compat = new FlatCompat({
7
+ recommendedConfig: js.configs.recommended
8
+ });
9
+
10
+ export default [
11
+ ...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended'),
12
+ {
13
+ files: ['**/*.ts', '**/*.tsx'],
14
+ languageOptions: {
15
+ globals: {
16
+ browser: true,
17
+ es2021: true,
18
+ jasmine: true,
19
+ },
20
+ parser: typescriptParser,
21
+ parserOptions: {
22
+ ecmaVersion: 12,
23
+ sourceType: 'module',
24
+ },
25
+ },
26
+ plugins: {
27
+ '@typescript-eslint': tseslint,
28
+ },
29
+ rules: {
30
+ '@typescript-eslint/no-inferrable-types': 'off',
31
+ '@typescript-eslint/no-explicit-any': 'off',
32
+ },
33
+ },
34
+ {
35
+ ignores: ['dist', 'test']
36
+ }
37
+ ];
@@ -13,43 +13,37 @@
13
13
  "./$(dashName).js": "./dist/src/$(dashName).js"
14
14
  },
15
15
  "scripts": {
16
- "start": "tsc && concurrently -k -r \"tsc --watch\" \"wds\"",
17
- "build": "rimraf dist && tsc && node --max-old-space-size=4096 node_modules/rollup/dist/bin/rollup -c rollup.config.mjs",
16
+ "start": "concurrently -k -r \"tsc --watch\" \"vite\"",
17
+ "build": "rimraf dist && tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite.js build",
18
18
  "start:build": "web-dev-server --root-dir dist --app-index index.html --open",
19
- "lint": "eslint \"**/*.{js,ts}\" --ignore-path .gitignore",
19
+ "lint": "eslint \"**/*.{js,ts}\" --ignore-pattern .gitignore",
20
20
  "test": "tsc --project tsconfig.test.json && wtr"
21
21
  },
22
22
  "dependencies": {
23
23
  "@vaadin/router": "^1.7.4",
24
- "lit": "^3.1.2",
25
- "typescript": "~5.5.4",
24
+ "lit": "^3.2.1",
25
+ "typescript": "~5.7.2",
26
26
  "igniteui-webcomponents": "~5.1.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@babel/preset-env": "^7.20.2",
30
- "@open-wc/building-rollup": "^2.2.1",
31
30
  "@open-wc/testing": "^4.0.0",
32
- "@rollup/plugin-babel": "^6.0.3",
33
- "@rollup/plugin-node-resolve": "^15.0.1",
34
31
  "@typescript-eslint/eslint-plugin": "^8.21.0",
35
32
  "@typescript-eslint/parser": "^8.21.0",
36
33
  "@web/dev-server": "^0.4.6",
37
- "@web/rollup-plugin-html": "^2.3.0",
38
- "@web/rollup-plugin-import-meta-assets": "^1.0.7",
39
34
  "@web/test-runner": "^0.18.0",
40
35
  "babel-plugin-template-html-minifier": "^4.1.0",
41
- "concurrently": "^8.2.2",
36
+ "concurrently": "^9.1.2",
42
37
  "deepmerge": "^4.2.2",
43
- "eslint": "^8.57.0",
38
+ "eslint": "^9.20.0",
44
39
  "eslint-plugin-lit": "^1.8.2",
45
40
  "igniteui-cli": "^13.1.5",
46
- "rimraf": "^5.0.5",
47
- "rollup": "^2.79.0",
48
- "rollup-plugin-copy-assets": "^2.0.3",
49
- "rollup-plugin-terser": "^7.0.2",
50
- "rollup-plugin-workbox": "^8.1.0",
41
+ "rimraf": "^5.0.10",
51
42
  "source-map": "^0.7.4",
52
- "tslib": "^2.6.2",
53
- "@types/mocha": "^10.0.6"
43
+ "tslib": "^2.8.1",
44
+ "@types/mocha": "^10.0.6",
45
+ "vite": "^6.0.10",
46
+ "vite-plugin-pwa": "^0.21.1",
47
+ "vite-plugin-static-copy": "^2.2.0"
54
48
  }
55
49
  }
@@ -0,0 +1,5 @@
1
+ declare module '*.css?inline' {
2
+ import { CSSResult } from 'lit';
3
+ const content: CSSResult;
4
+ export default content;
5
+ }
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "es2018",
4
- "module": "esnext",
3
+ "target": "es2021",
4
+ "module": "es2022",
5
5
  "moduleResolution": "node",
6
6
  "noEmitOnError": true,
7
7
  "lib": [
8
- "es2017",
8
+ "es2021",
9
9
  "dom",
10
10
  "dom.iterable"
11
11
  ],
@@ -0,0 +1,53 @@
1
+ import { defineConfig } from 'vite';
2
+ import { VitePWA } from 'vite-plugin-pwa';
3
+ import { viteStaticCopy } from 'vite-plugin-static-copy';
4
+
5
+ export default defineConfig({
6
+ build: {
7
+ rollupOptions: {
8
+ output: {
9
+ entryFileNames: '[hash].js',
10
+ chunkFileNames: '[hash].js',
11
+ assetFileNames: '[hash][extname]',
12
+ },
13
+ onwarn: (warning, warn) => {
14
+ if (warning.code === 'THIS_IS_UNDEFINED') return;
15
+ warn(warning);
16
+ },
17
+ },
18
+ target: 'es2021',
19
+ minify: 'terser',
20
+ emptyOutDir: false,
21
+ chunkSizeWarningLimit: 10 * 1024 * 1024 // 10 MB
22
+ },
23
+ plugins: [
24
+ /** Copy static assets */
25
+ viteStaticCopy({
26
+ targets: [
27
+ { src: 'src/assets', dest: 'src' }
28
+ ],
29
+ silent: true,
30
+ }),
31
+ /** PWA Plugin for service worker generation */
32
+ VitePWA({
33
+ registerType: 'autoUpdate',
34
+ strategies: 'generateSW',
35
+ workbox: {
36
+ globDirectory: 'dist',
37
+ globPatterns: ['**/*.{html,js,css,webmanifest}'],
38
+ globIgnores: ['polyfills/*.js', 'nomodule-*.js'],
39
+ navigateFallback: '/index.html',
40
+ runtimeCaching: [
41
+ {
42
+ urlPattern: /^polyfills\/.*\.js$/,
43
+ handler: 'CacheFirst',
44
+ },
45
+ ],
46
+ maximumFileSizeToCacheInBytes: 10 * 1024 * 1024 // 10 MB
47
+ },
48
+ manifest: {
49
+ theme_color: "#ffffff"
50
+ }
51
+ }),
52
+ ],
53
+ });
@@ -14,9 +14,9 @@
14
14
  },
15
15
  "scripts": {
16
16
  "start": "tsc && concurrently -k -r \"tsc --watch\" \"wds\"",
17
- "build": "rimraf dist && tsc && node --max-old-space-size=4096 node_modules/rollup/dist/bin/rollup -c rollup.config.mjs",
17
+ "build": "rimraf dist && tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite.js build",
18
18
  "start:build": "web-dev-server --root-dir dist --app-index index.html --open",
19
- "lint": "eslint \"**/*.{js,ts}\" --ignore-path .gitignore",
19
+ "lint": "eslint \"**/*.{js,ts}\" --ignore-pattern .gitignore",
20
20
  "test": "tsc --project tsconfig.test.json && wtr"
21
21
  },
22
22
  "dependencies": {
@@ -30,34 +30,28 @@
30
30
  "igniteui-webcomponents-grids": "~5.0.0",
31
31
  "igniteui-webcomponents-inputs": "~5.0.0",
32
32
  "igniteui-webcomponents-layouts": "~5.0.0",
33
- "lit": "^3.1.2",
34
- "typescript": "~5.5.4"
33
+ "lit": "^3.2.1",
34
+ "typescript": "~5.7.2"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@babel/preset-env": "^7.20.2",
38
- "@open-wc/building-rollup": "^2.2.1",
39
38
  "@open-wc/testing": "^4.0.0",
40
- "@rollup/plugin-babel": "^6.0.3",
41
- "@rollup/plugin-node-resolve": "^15.0.1",
42
39
  "@typescript-eslint/eslint-plugin": "^8.21.0",
43
40
  "@typescript-eslint/parser": "^8.21.0",
44
41
  "@web/dev-server": "^0.4.6",
45
- "@web/rollup-plugin-html": "^2.3.0",
46
- "@web/rollup-plugin-import-meta-assets": "^1.0.7",
47
42
  "@web/test-runner": "^0.18.0",
48
43
  "babel-plugin-template-html-minifier": "^4.1.0",
49
- "concurrently": "^8.2.2",
44
+ "concurrently": "^9.1.2",
50
45
  "deepmerge": "^4.2.2",
51
- "eslint": "^8.57.0",
46
+ "eslint": "^9.20.0",
52
47
  "eslint-plugin-lit": "^1.8.2",
53
48
  "igniteui-cli": "^14.0.0",
54
- "rimraf": "^5.0.5",
55
- "rollup": "^2.79.0",
56
- "rollup-plugin-copy-assets": "^2.0.3",
57
- "rollup-plugin-terser": "^7.0.2",
58
- "rollup-plugin-workbox": "^8.1.0",
49
+ "rimraf": "^5.0.10",
59
50
  "source-map": "^0.7.4",
60
- "tslib": "^2.6.2",
61
- "@types/mocha": "^10.0.6"
51
+ "tslib": "^2.8.1",
52
+ "@types/mocha": "^10.0.6",
53
+ "vite": "^6.0.10",
54
+ "vite-plugin-pwa": "^0.21.1",
55
+ "vite-plugin-static-copy": "^2.2.0"
62
56
  }
63
57
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-return-assign */
2
1
  import { html, css, LitElement } from 'lit';
3
2
  import { customElement } from 'lit/decorators.js';
4
3
  import {
@@ -1,31 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: { browser: true, es2020: true },
4
- extends: [
5
- 'eslint:recommended',
6
- 'plugin:@typescript-eslint/recommended',
7
- 'plugin:react-hooks/recommended',
8
- ],
9
- ignorePatterns: ['dist', '.eslintrc.cjs'],
10
- parser: '@typescript-eslint/parser',
11
- plugins: ['react-refresh'],
12
- rules: {
13
- '@typescript-eslint/no-unused-vars': [
14
- 'error',
15
- {
16
- args: 'all',
17
- argsIgnorePattern: '^_',
18
- caughtErrors: 'all',
19
- caughtErrorsIgnorePattern: '^_',
20
- destructuredArrayIgnorePattern: '^(_|set)',
21
- varsIgnorePattern: '^_',
22
- ignoreRestSiblings: true
23
- }
24
- ],
25
- 'react-refresh/only-export-components': [
26
- 'warn',
27
- { allowConstantExport: true },
28
- ],
29
- '@typescript-eslint/no-explicit-any': 'off'
30
- },
31
- }
@@ -1,24 +0,0 @@
1
- {
2
- "root": true,
3
- "env": {
4
- "browser": true,
5
- "es2021": true,
6
- "jasmine": true
7
- },
8
- "extends": [
9
- "eslint:recommended",
10
- "plugin:@typescript-eslint/recommended"
11
- ],
12
- "parser": "@typescript-eslint/parser",
13
- "parserOptions": {
14
- "ecmaVersion": 12,
15
- "sourceType": "module"
16
- },
17
- "plugins": [
18
- "@typescript-eslint"
19
- ],
20
- "rules": {
21
- "@typescript-eslint/no-inferrable-types": "off",
22
- "@typescript-eslint/no-explicit-any": "off"
23
- }
24
- }
@@ -1,95 +0,0 @@
1
- import babel from '@rollup/plugin-babel';
2
- import nodeResolve from '@rollup/plugin-node-resolve';
3
- import { rollupPluginHTML as html } from '@web/rollup-plugin-html';
4
- import { importMetaAssets } from '@web/rollup-plugin-import-meta-assets';
5
- import path from 'path';
6
- import copy from 'rollup-plugin-copy-assets';
7
- import { terser } from 'rollup-plugin-terser';
8
- import { generateSW } from 'rollup-plugin-workbox';
9
-
10
- export default {
11
- input: 'index.html',
12
- output: {
13
- entryFileNames: '[hash].js',
14
- chunkFileNames: '[hash].js',
15
- assetFileNames: '[hash][extname]',
16
- format: 'es',
17
- dir: 'dist',
18
- },
19
- onwarn: function(warning) {
20
- // Skip https://rollupjs.org/troubleshooting/#error-this-is-undefined
21
- if ( warning.code === 'THIS_IS_UNDEFINED' ) { return; }
22
- },
23
- preserveEntrySignatures: false,
24
-
25
- plugins: [
26
- copy({
27
- assets: [
28
- 'src/assets',
29
- ],
30
- }),
31
- /** Enable using HTML as rollup entrypoint */
32
- html({
33
- minify: true,
34
- injectServiceWorker: true,
35
- serviceWorkerPath: 'dist/sw.js',
36
- }),
37
- /** Resolve bare module imports */
38
- nodeResolve(),
39
- /** Minify JS */
40
- terser(),
41
- /** Bundle assets references via import.meta.url */
42
- importMetaAssets(),
43
- /** Compile JS to a lower language target */
44
- babel({
45
- compact: true,
46
- babelHelpers: 'bundled',
47
- presets: [
48
- [
49
- '@babel/preset-env',
50
- {
51
- targets: [
52
- 'last 3 Chrome major versions',
53
- 'last 3 Firefox major versions',
54
- 'last 3 Edge major versions',
55
- 'last 3 Safari major versions',
56
- ],
57
- modules: false,
58
- bugfixes: true,
59
- },
60
- ],
61
- ],
62
- plugins: [
63
- [
64
- 'babel-plugin-template-html-minifier',
65
- {
66
- modules: { lit: ['html', { name: 'css', encapsulation: 'style' }] },
67
- failOnError: false,
68
- strictCSS: true,
69
- htmlMinifier: {
70
- collapseWhitespace: true,
71
- conservativeCollapse: true,
72
- removeComments: true,
73
- caseSensitive: true,
74
- minifyCSS: true,
75
- },
76
- },
77
- ],
78
- ],
79
- }),
80
- /** Create and inject a service worker */
81
- generateSW({
82
- globIgnores: ['polyfills/*.js', 'nomodule-*.js'],
83
- navigateFallback: '/index.html',
84
- // where to output the generated sw
85
- swDest: path.join('dist', 'sw.js'),
86
- // directory to match patterns against to be precached
87
- globDirectory: path.join('dist'),
88
- // cache any html js and css by default
89
- globPatterns: ['**/*.{html,js,css,webmanifest}'],
90
- skipWaiting: true,
91
- clientsClaim: true,
92
- runtimeCaching: [{ urlPattern: 'polyfills/*.js', handler: 'CacheFirst' }],
93
- }),
94
- ],
95
- };