Skip to content

Commit 2da5048

Browse files
committed
update demo
1 parent ad0a0e5 commit 2da5048

4 files changed

Lines changed: 67 additions & 102 deletions

File tree

package-lock.json

Lines changed: 38 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@
1818
},
1919
"homepage": "https://github.com/node-projects/web-component-designer-zpl-demo#readme",
2020
"devDependencies": {
21+
"@types/node": "^25.6.0",
2122
"@web/dev-server": "^0.4.6",
22-
"typescript": "^5.8.3"
23+
"typescript": "^6.0.3"
2324
},
2425
"dependencies": {
25-
"@node-projects/base-custom-webcomponent": "0.30.0",
26-
"@node-projects/web-component-designer": "^0.1.260",
26+
"@node-projects/base-custom-webcomponent": "0.46.0",
27+
"@node-projects/web-component-designer": "^0.2.5",
2728
"@node-projects/web-component-designer-codeview-monaco": "^0.1.33",
28-
"@node-projects/web-component-designer-zpl": "^0.1.22",
29-
"es-module-shims": "^2.6.1",
30-
"jsbarcode": "^3.12.1"
29+
"@node-projects/web-component-designer-zpl": "^0.2.0",
30+
"es-module-shims": "^2.8.0",
31+
"jsbarcode": "^3.12.3"
3132
}
3233
}

src/initialize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ serviceContainer.config.codeViewWidget = CodeViewMonaco;
1212

1313
const documentContainer = new DocumentContainer(serviceContainer);
1414
documentContainer.style.gridArea = 'c';
15-
document.getElementById('root').appendChild(documentContainer);
15+
document.getElementById('root')!.appendChild(documentContainer);
1616
(<CodeViewMonaco>documentContainer.codeView).language = "zplLanguage";
1717
(<CodeViewMonaco>documentContainer.codeView).theme = "zplTheme";
1818
addZplLanguageToMonaco();

tsconfig.json

Lines changed: 21 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,26 @@
11
{
22
"compilerOptions": {
3-
/* Basic Options */
4-
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
5-
"module": "esnext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
6-
"lib": ["DOM", "ES2023"], /* Specify library files to be included in the compilation. */
7-
"allowJs": true, /* Allow javascript files to be compiled. */
8-
// "checkJs": true, /* Report errors in .js files. */
9-
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
10-
"declaration": true, /* Generates corresponding '.d.ts' file. */
11-
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
12-
"sourceMap": false, /* Generates corresponding '.map' file. */
13-
// "outFile": "./", /* Concatenate and emit output to single file. */
14-
"outDir": "./dist", /* Redirect output structure to the directory. */
15-
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
16-
// "composite": true, /* Enable project compilation */
17-
// "removeComments": true, /* Do not emit comments to output. */
18-
// "noEmit": true, /* Do not emit outputs. */
19-
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
20-
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
21-
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
22-
23-
/* Strict Type-Checking Options */
24-
// "strict": true, /* Enable all strict type-checking options. */
25-
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
26-
//"strictNullChecks": false, /* Enable strict null checks. */
27-
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
28-
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
29-
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
30-
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
31-
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
3+
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
4+
"module": "esnext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
5+
"lib": [
6+
"DOM",
7+
"ES2023"
8+
], /* Specify library files to be included in the compilation. */
9+
"allowJs": true, /* Allow javascript files to be compiled. */
10+
"declaration": true, /* Generates corresponding '.d.ts' file. */
11+
"sourceMap": false, /* Generates corresponding '.map' file. */
12+
"outDir": "./dist", /* Redirect output structure to the directory. */
13+
"rootDir": "./src",
14+
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
15+
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
3216
"resolveJsonModule": true,
33-
34-
/* Additional Checks */
35-
"noUnusedLocals": true, /* Report errors on unused locals. */
36-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
37-
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
38-
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
39-
40-
/* Module Resolution Options */
41-
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
42-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
43-
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
44-
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
45-
// "typeRoots": [], /* List of folders to include type definitions from. */
46-
// "types": [], /* Type declaration files to be included in compilation. */
47-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
48-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
49-
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
50-
51-
/* Source Map Options */
52-
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
53-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
54-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
55-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
56-
57-
/* Experimental Options */
58-
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
59-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
60-
"plugins": [
61-
{
62-
"name": "typescript-lit-html-plugin"
63-
}
64-
]
17+
"noUnusedLocals": true, /* Report errors on unused locals. */
18+
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
19+
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
20+
"moduleResolution": "bundler", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
21+
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
22+
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
23+
"types": ["node"]
6524
},
6625
"include": [
6726
"./src/**/*",
@@ -71,4 +30,4 @@
7130
"node_modules",
7231
"**/*.spec.ts"
7332
]
74-
}
33+
}

0 commit comments

Comments
 (0)