@omnia/tooling-vue 8.0.494-dev → 8.0.496-dev
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/internal-do-not-import-from-here/config/tooling.output.json +1 -1
- package/internal-do-not-import-from-here/config/wctypings.d.ts +8 -1
- package/internal-do-not-import-from-here/tasks/ComponentDocRegistrations.js +1 -1
- package/internal-do-not-import-from-here/tasks/bundle.js +14 -28
- package/package.json +5 -4
|
@@ -14,6 +14,7 @@ exports.addDependency = addDependency;
|
|
|
14
14
|
const tslib_1 = require("tslib");
|
|
15
15
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
16
16
|
const del_1 = tslib_1.__importDefault(require("del"));
|
|
17
|
+
const clean_css_1 = tslib_1.__importDefault(require("clean-css"));
|
|
17
18
|
const fsExtra = tslib_1.__importStar(require("fs-extra"));
|
|
18
19
|
const globby_1 = require("globby");
|
|
19
20
|
const terser_1 = require("terser");
|
|
@@ -633,6 +634,7 @@ function minifyBundles() {
|
|
|
633
634
|
if (process.argv.length > 0 && process.argv.find(argv => argv === "--minify") !== undefined) {
|
|
634
635
|
let startTime = new Date().getTime();
|
|
635
636
|
$.tooling.log('Minify bundles running...');
|
|
637
|
+
const cleanCSS = new clean_css_1.default();
|
|
636
638
|
const jsPaths = (0, globby_1.globbySync)([`${$.tooling.utils.root($.tooling.composer.OmniaOutput.OutputBundlePath).replace(/\\/g, "/")}/*.js`]);
|
|
637
639
|
let promises = [];
|
|
638
640
|
jsPaths.forEach(filePath => {
|
|
@@ -647,12 +649,22 @@ function minifyBundles() {
|
|
|
647
649
|
content = content.replace(new RegExp(vendorProdId, "g"), o$.enums.omniaResourceManifests.Vendor.toString());
|
|
648
650
|
outFileName = `${$.tooling.utils.root($.tooling.composer.OmniaOutput.OutputBundlePath)}/omnia.vendor_6270b632-1f44-4146-bace-137131c0471b.min.js`;
|
|
649
651
|
}
|
|
650
|
-
|
|
652
|
+
const minified = await (0, terser_1.minify)(content, {
|
|
651
653
|
sourceMap: false,
|
|
652
|
-
ecma: 2020
|
|
654
|
+
ecma: 2020
|
|
653
655
|
});
|
|
654
656
|
await fsExtra.writeFile(outFileName, minified.code, 'utf8');
|
|
655
657
|
$.tooling.log(`Minify Js Done -> ${filePath}`);
|
|
658
|
+
// check if exist css files to minify
|
|
659
|
+
const cssFilePath = `${filePath.substring(0, filePath.length - 3)}.css`;
|
|
660
|
+
if (fsExtra.existsSync(cssFilePath)) {
|
|
661
|
+
$.tooling.log(`Minify Css -> ${cssFilePath}`);
|
|
662
|
+
let content = fsExtra.readFileSync(cssFilePath, 'utf8');
|
|
663
|
+
const output = cleanCSS.minify(content);
|
|
664
|
+
const minifiedCssFilePath = `${filePath.substring(0, filePath.length - 3)}.min.css`;
|
|
665
|
+
await fsExtra.writeFile(minifiedCssFilePath, output.styles, 'utf8');
|
|
666
|
+
$.tooling.log(`Minify Css Done -> ${minifiedCssFilePath}`);
|
|
667
|
+
}
|
|
656
668
|
}
|
|
657
669
|
resolve();
|
|
658
670
|
}
|
|
@@ -1768,34 +1780,8 @@ function prefixCssSelector() {
|
|
|
1768
1780
|
];
|
|
1769
1781
|
return require('postcss-prefix-selector')({
|
|
1770
1782
|
prefix: '.v-application',
|
|
1771
|
-
//exclude: [/.v-tooltip__content/, /.v-menu__content/],
|
|
1772
|
-
//exclude: [/.v-select/],
|
|
1773
1783
|
transform: function (prefix, selector, prefixedSelector) {
|
|
1774
1784
|
return selector;
|
|
1775
|
-
// temp comment out prefix rule below to testing with vuetify 3 in omnia page first.
|
|
1776
|
-
// // Only apply html/body rule in omnia page.
|
|
1777
|
-
// if (selector === "html" || selector === "body") {
|
|
1778
|
-
// return `${selector}[data-omfx]`;
|
|
1779
|
-
// }
|
|
1780
|
-
// // exclude rule .v-application for web component
|
|
1781
|
-
// if (selector === '.v-application') {
|
|
1782
|
-
// return 'html .v-application:not([data-omwc])'
|
|
1783
|
-
// }
|
|
1784
|
-
// // fix issue <v-menu content-class="v-application"
|
|
1785
|
-
// if (selector === '.v-menu__content') {
|
|
1786
|
-
// return 'html div.v-menu__content:not([data-omwc])'
|
|
1787
|
-
// }
|
|
1788
|
-
// if (selector.indexOf('.theme--light') === 0
|
|
1789
|
-
// || selector.indexOf('.theme--dark') === 0
|
|
1790
|
-
// || selector.indexOf('.v-application--is') > -1
|
|
1791
|
-
// || selector.indexOf('.v-tooltip__content') > -1
|
|
1792
|
-
// || selector.indexOf('.v-overlay-container') > -1
|
|
1793
|
-
// || selector.indexOf('.v-menu__content') > -1
|
|
1794
|
-
// || selector.indexOf('.v-dialog__content') > -1) {
|
|
1795
|
-
// //console.log(selector)
|
|
1796
|
-
// return `html ${selector}`;
|
|
1797
|
-
// }
|
|
1798
|
-
// return `[data-omfx] ${selector}, .v-menu__content ${selector}, .v-overlay-container ${selector}, .v-tooltip__content ${selector}, .v-dialog__content ${selector}`
|
|
1799
1785
|
}
|
|
1800
1786
|
});
|
|
1801
1787
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnia/tooling-vue",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.496-dev",
|
|
5
5
|
"description": "Used to bundle and serve manifests web component that build on Vue framework.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
],
|
|
20
20
|
"author": "Omnia Digital Workplace AB",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@omnia/fx-models": "8.0.
|
|
23
|
-
"@omnia/tooling-composers": "8.0.
|
|
22
|
+
"@omnia/fx-models": "8.0.496-dev",
|
|
23
|
+
"@omnia/tooling-composers": "8.0.496-dev",
|
|
24
24
|
"@types/mousetrap": "1.5.34",
|
|
25
25
|
"@types/quill": "1.3.6",
|
|
26
26
|
"@types/zepto": "1.0.29",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"css-loader": "5.0.1",
|
|
35
35
|
"file-loader": "6.2.0",
|
|
36
36
|
"json-parse-better-errors": "1.0.2",
|
|
37
|
-
"terser": "5.
|
|
37
|
+
"terser": "5.43.1",
|
|
38
|
+
"clean-css": "5.3.3",
|
|
38
39
|
"less-loader": "10.2.0",
|
|
39
40
|
"mini-css-extract-plugin": "1.3.3",
|
|
40
41
|
"postcss-loader": "7.2.4",
|