@ui5/webcomponents-tools 0.0.0-f2abb18c2 → 0.0.0-f42e7c18c
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 +1620 -4
- package/README.md +6 -9
- package/assets-meta.js +26 -6
- package/bin/dev.js +1 -5
- package/components-package/cypress/support/commands.js +39 -0
- package/components-package/cypress/support/component-index.html +17 -0
- package/components-package/cypress/support/component.d.ts +23 -0
- package/components-package/cypress/support/component.js +34 -0
- package/components-package/cypress.config.js +19 -0
- package/components-package/eslint.js +98 -2
- package/components-package/nps.js +116 -55
- package/components-package/postcss.components.js +1 -21
- package/components-package/postcss.themes.js +1 -23
- package/components-package/vite.config.js +13 -0
- package/components-package/wdio.js +110 -39
- package/icons-collection/nps.js +54 -11
- package/lib/amd-to-es6/index.js +102 -0
- package/lib/amd-to-es6/no-remaining-require.js +33 -0
- package/lib/cem/custom-elements-manifest.config.mjs +527 -0
- package/lib/cem/event.mjs +168 -0
- package/lib/cem/schema-internal.json +1413 -0
- package/lib/cem/schema.json +1098 -0
- package/lib/cem/types-internal.d.ts +808 -0
- package/lib/cem/types.d.ts +736 -0
- package/lib/cem/utils.mjs +408 -0
- package/lib/cem/validate.js +70 -0
- package/lib/copy-and-watch/index.js +30 -5
- package/lib/copy-list/index.js +28 -0
- package/lib/create-icons/index.js +126 -52
- package/lib/create-illustrations/index.js +182 -0
- package/lib/create-new-component/index.js +63 -97
- package/lib/create-new-component/tsFileContentTemplate.js +71 -0
- package/lib/css-processors/css-processor-components.mjs +77 -0
- package/lib/css-processors/css-processor-themes.mjs +79 -0
- package/lib/css-processors/scope-variables.mjs +49 -0
- package/lib/css-processors/shared.mjs +76 -0
- package/lib/dev-server/custom-hot-update-plugin.js +39 -0
- package/lib/dev-server/dev-server.mjs +66 -0
- package/lib/dev-server/virtual-index-html-plugin.js +52 -0
- package/lib/generate-js-imports/illustrations.js +86 -0
- package/lib/generate-json-imports/i18n.js +66 -37
- package/lib/generate-json-imports/themes.js +55 -34
- package/lib/hbs2lit/src/compiler.js +24 -4
- package/lib/hbs2lit/src/includesReplacer.js +5 -5
- package/lib/hbs2lit/src/litVisitor2.js +113 -25
- package/lib/hbs2lit/src/svgProcessor.js +12 -5
- package/lib/hbs2ui5/RenderTemplates/LitRenderer.js +40 -14
- package/lib/hbs2ui5/index.js +57 -24
- package/lib/i18n/defaults.js +66 -57
- package/lib/i18n/toJSON.js +13 -12
- package/lib/postcss-combine-duplicated-selectors/index.js +185 -0
- package/lib/remove-dev-mode/remove-dev-mode.mjs +37 -0
- package/lib/scoping/get-all-tags.js +11 -11
- package/lib/scoping/lint-src.js +9 -8
- package/lib/scoping/missing-dependencies.js +65 -0
- package/lib/scoping/report-tags-usage.js +28 -0
- package/lib/scoping/scope-test-pages.js +2 -1
- package/lib/test-runner/test-runner.js +71 -0
- package/package.json +59 -53
- package/tsconfig.json +16 -0
- package/types/index.d.ts +1 -0
- package/bin/init-ui5-package.js +0 -3
- package/components-package/rollup.js +0 -147
- package/components-package/serve.json +0 -3
- package/lib/documentation/index.js +0 -143
- package/lib/documentation/templates/api-component-since.js +0 -3
- package/lib/documentation/templates/api-css-variables-section.js +0 -24
- package/lib/documentation/templates/api-events-section.js +0 -35
- package/lib/documentation/templates/api-methods-section.js +0 -26
- package/lib/documentation/templates/api-properties-section.js +0 -40
- package/lib/documentation/templates/api-slots-section.js +0 -28
- package/lib/documentation/templates/template.js +0 -38
- package/lib/init-package/index.js +0 -123
- package/lib/init-package/resources/.eslintignore +0 -3
- package/lib/init-package/resources/bundle.es5.js +0 -25
- package/lib/init-package/resources/bundle.esm.js +0 -34
- package/lib/init-package/resources/config/.eslintrc.js +0 -1
- package/lib/init-package/resources/config/postcss.components/postcss.config.js +0 -1
- package/lib/init-package/resources/config/postcss.themes/postcss.config.js +0 -1
- package/lib/init-package/resources/config/rollup.config.js +0 -1
- package/lib/init-package/resources/config/wdio.conf.js +0 -1
- package/lib/init-package/resources/package-scripts.js +0 -11
- package/lib/init-package/resources/src/Assets.js +0 -5
- package/lib/init-package/resources/src/MyFirstComponent.hbs +0 -1
- package/lib/init-package/resources/src/MyFirstComponent.js +0 -56
- package/lib/init-package/resources/src/i18n/messagebundle.properties +0 -2
- package/lib/init-package/resources/src/i18n/messagebundle_de.properties +0 -1
- package/lib/init-package/resources/src/i18n/messagebundle_en.properties +0 -1
- package/lib/init-package/resources/src/i18n/messagebundle_es.properties +0 -1
- package/lib/init-package/resources/src/i18n/messagebundle_fr.properties +0 -1
- package/lib/init-package/resources/src/themes/MyFirstComponent.css +0 -11
- package/lib/init-package/resources/src/themes/sap_belize/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_belize_hcb/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_belize_hcw/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_fiori_3/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_fiori_3_dark/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_fiori_3_hcb/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_fiori_3_hcw/parameters-bundle.css +0 -3
- package/lib/init-package/resources/test/pages/index.html +0 -56
- package/lib/init-package/resources/test/specs/Demo.spec.js +0 -12
- package/lib/jsdoc/config.json +0 -29
- package/lib/jsdoc/plugin.js +0 -2407
- package/lib/jsdoc/template/publish.js +0 -4092
- package/lib/postcss-css-to-esm/index.js +0 -42
- package/lib/postcss-css-to-json/index.js +0 -27
- package/package-lock.json +0 -48
@@ -1,42 +0,0 @@
|
|
1
|
-
const postcss = require('postcss');
|
2
|
-
const fs = require('fs');
|
3
|
-
const path = require('path');
|
4
|
-
const mkdirp = require('mkdirp');
|
5
|
-
const assets = require("../../assets-meta.js");
|
6
|
-
|
7
|
-
const DEFAULT_THEME = assets.themes.default;
|
8
|
-
|
9
|
-
const getDefaultThemeCode = packageName => {
|
10
|
-
return `import { registerThemeProperties } from "@ui5/webcomponents-base/dist/asset-registries/Themes.js";
|
11
|
-
|
12
|
-
import defaultThemeBase from "@ui5/webcomponents-theme-base/dist/generated/themes/${DEFAULT_THEME}/parameters-bundle.css.js";
|
13
|
-
import defaultTheme from "./${DEFAULT_THEME}/parameters-bundle.css.js";
|
14
|
-
|
15
|
-
registerThemeProperties("@ui5/webcomponents-theme-base", "${DEFAULT_THEME}", defaultThemeBase);
|
16
|
-
registerThemeProperties("${packageName}", "${DEFAULT_THEME}", defaultTheme);
|
17
|
-
`;
|
18
|
-
};
|
19
|
-
|
20
|
-
const proccessCSS = css => {
|
21
|
-
css = css.replace(/\.sapThemeMeta[\s\S]*?:root/, ":root");
|
22
|
-
css = css.replace(/\.background-image.*{.*}/, "");
|
23
|
-
css = css.replace(/\.sapContrast[ ]*:root[\s\S]*?}/, "");
|
24
|
-
css = css.replace(/--sapFontUrl.*\);?/, "");
|
25
|
-
return JSON.stringify(css);
|
26
|
-
}
|
27
|
-
|
28
|
-
module.exports = postcss.plugin('add css to esm transform plugin', function (opts) {
|
29
|
-
opts = opts || {};
|
30
|
-
|
31
|
-
return function (root) {
|
32
|
-
let css = root.toString();
|
33
|
-
css = proccessCSS(css);
|
34
|
-
|
35
|
-
const targetFile = root.source.input.from.replace(`/${opts.toReplace}/`, "/dist/generated/").replace(`\\${opts.toReplace}\\`, "\\dist\\generated\\");
|
36
|
-
mkdirp.sync(path.dirname(targetFile));
|
37
|
-
|
38
|
-
const filePath = `${targetFile}.js`;
|
39
|
-
const defaultTheme = opts.includeDefaultTheme ? getDefaultThemeCode(opts.packageName) : ``;
|
40
|
-
fs.writeFileSync(filePath, `${defaultTheme}export default ${css};`);
|
41
|
-
}
|
42
|
-
});
|
@@ -1,27 +0,0 @@
|
|
1
|
-
const postcss = require('postcss');
|
2
|
-
const fs = require('fs');
|
3
|
-
const path = require('path');
|
4
|
-
const mkdirp = require('mkdirp');
|
5
|
-
|
6
|
-
const proccessCSS = css => {
|
7
|
-
css = css.replace(/\.sapThemeMeta[\s\S]*?:root/, ":root");
|
8
|
-
css = css.replace(/\.background-image.*{.*}/, "");
|
9
|
-
css = css.replace(/\.sapContrast[ ]*:root[\s\S]*?}/, "");
|
10
|
-
css = css.replace(/--sapFontUrl.*\);?/, "");
|
11
|
-
return css;
|
12
|
-
}
|
13
|
-
|
14
|
-
module.exports = postcss.plugin('add css to JSON transform plugin', function (opts) {
|
15
|
-
opts = opts || {};
|
16
|
-
|
17
|
-
return function (root) {
|
18
|
-
let css = root.toString();
|
19
|
-
css = proccessCSS(css);
|
20
|
-
|
21
|
-
const targetFile = root.source.input.from.replace(`/${opts.toReplace}/`, "/dist/generated/assets/").replace(`\\${opts.toReplace}\\`, "\\dist\\generated\\assets\\");
|
22
|
-
mkdirp.sync(path.dirname(targetFile));
|
23
|
-
|
24
|
-
const filePath = `${targetFile}.json`;
|
25
|
-
fs.writeFileSync(filePath, JSON.stringify({_: css}));
|
26
|
-
}
|
27
|
-
});
|
package/package-lock.json
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "@ui5/webcomponents-tools",
|
3
|
-
"version": "1.0.0-rc.8",
|
4
|
-
"lockfileVersion": 1,
|
5
|
-
"requires": true,
|
6
|
-
"dependencies": {
|
7
|
-
"balanced-match": {
|
8
|
-
"version": "1.0.0",
|
9
|
-
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
10
|
-
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
11
|
-
"dev": true
|
12
|
-
},
|
13
|
-
"brace-expansion": {
|
14
|
-
"version": "1.1.11",
|
15
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
16
|
-
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
17
|
-
"dev": true,
|
18
|
-
"requires": {
|
19
|
-
"balanced-match": "^1.0.0",
|
20
|
-
"concat-map": "0.0.1"
|
21
|
-
}
|
22
|
-
},
|
23
|
-
"concat-map": {
|
24
|
-
"version": "0.0.1",
|
25
|
-
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
26
|
-
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
27
|
-
"dev": true
|
28
|
-
},
|
29
|
-
"minimatch": {
|
30
|
-
"version": "3.0.4",
|
31
|
-
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
32
|
-
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
33
|
-
"dev": true,
|
34
|
-
"requires": {
|
35
|
-
"brace-expansion": "^1.1.7"
|
36
|
-
}
|
37
|
-
},
|
38
|
-
"recursive-readdir": {
|
39
|
-
"version": "2.2.2",
|
40
|
-
"resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz",
|
41
|
-
"integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==",
|
42
|
-
"dev": true,
|
43
|
-
"requires": {
|
44
|
-
"minimatch": "3.0.4"
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
}
|