@ui5/webcomponents-tools 0.0.0-7c7170d4a → 0.0.0-7d8c57f70
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/CHANGELOG.md +4 -311
- package/assets-meta.js +3 -0
- package/components-package/nps.js +14 -6
- package/components-package/wdio.js +405 -414
- package/components-package/wdio.sync.js +368 -0
- package/icons-collection/nps.js +2 -2
- package/lib/create-icons/index.js +6 -8
- package/lib/create-new-component/index.js +11 -4
- package/lib/create-new-component/jsFileContentTemplate.js +73 -0
- package/lib/css-processors/css-processor-component-styles.mjs +0 -1
- package/lib/generate-custom-elements-manifest/index.js +271 -0
- package/lib/generate-json-imports/i18n.js +35 -3
- package/lib/generate-json-imports/themes.js +29 -2
- package/lib/i18n/defaults.js +1 -1
- package/lib/jsdoc/config.json +29 -0
- package/lib/jsdoc/configTypescript.json +29 -0
- package/lib/jsdoc/plugin.js +2468 -0
- package/lib/jsdoc/preprocess.js +146 -0
- package/lib/jsdoc/template/publish.js +4120 -0
- package/lib/scoping/lint-src.js +7 -8
- package/package.json +3 -2
- package/lib/dev-server/ssr-dom-shim-loader.js +0 -26
- package/lib/remove-dev-mode/remove-dev-mode.mjs +0 -37
package/lib/scoping/lint-src.js
CHANGED
@@ -7,26 +7,25 @@ const tags = getAllTags(process.cwd());
|
|
7
7
|
|
8
8
|
const errors = [];
|
9
9
|
|
10
|
-
const removeComments = str => str.replaceAll(/\/\*[\s\S]*?\*\/|([^:]|^)\/\/.*$/gm, "");
|
11
|
-
|
12
10
|
glob.sync(path.join(process.cwd(), "src/**/*.css")).forEach(file => {
|
13
|
-
let content =
|
11
|
+
let content = String(fs.readFileSync(file));
|
14
12
|
tags.forEach(tag => {
|
15
13
|
if (content.match(new RegExp(`(^|[^\.\-_A-Za-z0-9"\[])(${tag})([^\-_A-Za-z0-9]|$)`, "g"))) {
|
16
|
-
errors.push(
|
14
|
+
errors.push(`Warning! ${tag} found in ${file}`);
|
17
15
|
}
|
18
16
|
});
|
19
17
|
});
|
20
18
|
|
21
|
-
glob.sync(path.join(process.cwd(), "src/**/*.
|
22
|
-
let content =
|
19
|
+
glob.sync(path.join(process.cwd(), "src/**/*.js")).forEach(file => {
|
20
|
+
let content = String(fs.readFileSync(file));
|
23
21
|
tags.forEach(tag => {
|
24
22
|
if (content.match(new RegExp(`querySelector[A-Za-z]*..${tag}`, "g"))) {
|
25
|
-
errors.push(`querySelector for ${tag} found in ${file}`);
|
23
|
+
errors.push(`Warning! querySelector for ${tag} found in ${file}`);
|
26
24
|
}
|
27
25
|
});
|
28
26
|
});
|
29
27
|
|
30
28
|
if (errors.length) {
|
31
|
-
|
29
|
+
errors.forEach(error => console.log(error));
|
30
|
+
throw new Error("Errors found.");
|
32
31
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ui5/webcomponents-tools",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-7d8c57f70",
|
4
4
|
"description": "UI5 Web Components: webcomponents.tools",
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
6
6
|
"license": "Apache-2.0",
|
@@ -52,6 +52,7 @@
|
|
52
52
|
"globby": "^13.1.1",
|
53
53
|
"handlebars": "^4.7.7",
|
54
54
|
"is-port-reachable": "^3.1.0",
|
55
|
+
"jsdoc": "^3.6.6",
|
55
56
|
"json-beautify": "^1.1.1",
|
56
57
|
"mkdirp": "^1.0.4",
|
57
58
|
"nps": "^5.10.0",
|
@@ -69,7 +70,7 @@
|
|
69
70
|
},
|
70
71
|
"peerDependencies": {
|
71
72
|
"chromedriver": "*",
|
72
|
-
"typescript": "
|
73
|
+
"typescript": "5.2.2"
|
73
74
|
},
|
74
75
|
"peerDependenciesMeta": {
|
75
76
|
"typescript": {
|
@@ -1,26 +0,0 @@
|
|
1
|
-
const fs = require("fs");
|
2
|
-
|
3
|
-
/**
|
4
|
-
* UI5Elements loads the ssr-dom.js file with a package specifier to use the export conditions
|
5
|
-
* in the package.json so that a shim for the dom can be loaded from SSR environments
|
6
|
-
* This however makes the TS Checker plugin used for development try to load the file from dist as input
|
7
|
-
* This plugin loads an empty file and TS ignores the file completely
|
8
|
-
*/
|
9
|
-
|
10
|
-
const ssrDomShimLoader = async () => {
|
11
|
-
return {
|
12
|
-
name: 'ssr-dom-shim-loader',
|
13
|
-
resolveId(id) {
|
14
|
-
if (id === "@ui5/webcomponents-base/dist/ssr-dom.js") {
|
15
|
-
return "\0shim"
|
16
|
-
}
|
17
|
-
},
|
18
|
-
load(id) {
|
19
|
-
if (id === "\0shim") {
|
20
|
-
return "";
|
21
|
-
}
|
22
|
-
}
|
23
|
-
}
|
24
|
-
};
|
25
|
-
|
26
|
-
module.exports = ssrDomShimLoader;
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import { globby } from "globby";
|
2
|
-
import * as esbuild from 'esbuild'
|
3
|
-
import * as fs from "fs";
|
4
|
-
|
5
|
-
let customPlugin = {
|
6
|
-
name: 'ui5-tools',
|
7
|
-
setup(build) {
|
8
|
-
build.onLoad({ filter: /UI5Element.ts$/ }, async (args) => {
|
9
|
-
let text = await fs.promises.readFile(args.path, 'utf8');
|
10
|
-
text = text.replaceAll(/const DEV_MODE = true/g, "");
|
11
|
-
text = text.replaceAll(/if \(DEV_MODE\)/g, "if (false)");
|
12
|
-
return {
|
13
|
-
contents: text,
|
14
|
-
loader: 'ts',
|
15
|
-
}
|
16
|
-
})
|
17
|
-
},
|
18
|
-
}
|
19
|
-
|
20
|
-
const getConfig = async () => {
|
21
|
-
const config = {
|
22
|
-
entryPoints: await globby("src/**/*.ts"),
|
23
|
-
bundle: false,
|
24
|
-
minify: true,
|
25
|
-
sourcemap: true,
|
26
|
-
outdir: 'dist/prod',
|
27
|
-
outbase: 'src',
|
28
|
-
plugins: [
|
29
|
-
customPlugin,
|
30
|
-
]
|
31
|
-
};
|
32
|
-
return config;
|
33
|
-
}
|
34
|
-
|
35
|
-
|
36
|
-
const config = await getConfig();
|
37
|
-
const result = await esbuild.build(config);
|