@omnia/tooling-vue 8.0.519-dev → 8.0.521-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.
@@ -14,7 +14,6 @@ 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"));
18
17
  const fsExtra = tslib_1.__importStar(require("fs-extra"));
19
18
  const globby_1 = require("globby");
20
19
  const terser_1 = require("terser");
@@ -634,7 +633,7 @@ function minifyBundles() {
634
633
  if (process.argv.length > 0 && process.argv.find(argv => argv === "--minify") !== undefined) {
635
634
  let startTime = new Date().getTime();
636
635
  $.tooling.log('Minify bundles running...');
637
- const cleanCSS = new clean_css_1.default();
636
+ const esbuild = require('esbuild');
638
637
  const jsPaths = (0, globby_1.globbySync)([`${$.tooling.utils.root($.tooling.composer.OmniaOutput.OutputBundlePath).replace(/\\/g, "/")}/*.js`]);
639
638
  let promises = [];
640
639
  jsPaths.forEach(filePath => {
@@ -658,11 +657,14 @@ function minifyBundles() {
658
657
  // check if exist css files to minify
659
658
  const cssFilePath = `${filePath.substring(0, filePath.length - 3)}.css`;
660
659
  if (fsExtra.existsSync(cssFilePath)) {
661
- $.tooling.log(`Minify Css -> ${cssFilePath}`);
662
- let content = fsExtra.readFileSync(cssFilePath, 'utf8');
663
- const output = cleanCSS.minify(content);
664
660
  const minifiedCssFilePath = `${filePath.substring(0, filePath.length - 3)}.min.css`;
665
- await fsExtra.writeFile(minifiedCssFilePath, output.styles, 'utf8');
661
+ $.tooling.log(`Minify Css -> ${cssFilePath}`);
662
+ await esbuild.build({
663
+ entryPoints: [cssFilePath],
664
+ bundle: false,
665
+ outfile: minifiedCssFilePath,
666
+ minify: true,
667
+ });
666
668
  $.tooling.log(`Minify Css Done -> ${minifiedCssFilePath}`);
667
669
  }
668
670
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/tooling-vue",
3
3
  "license": "MIT",
4
- "version": "8.0.519-dev",
4
+ "version": "8.0.521-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.519-dev",
23
- "@omnia/tooling-composers": "8.0.519-dev",
22
+ "@omnia/fx-models": "8.0.521-dev",
23
+ "@omnia/tooling-composers": "8.0.521-dev",
24
24
  "@types/mousetrap": "1.5.34",
25
25
  "@types/quill": "1.3.6",
26
26
  "@types/zepto": "1.0.29",
@@ -35,7 +35,6 @@
35
35
  "file-loader": "6.2.0",
36
36
  "json-parse-better-errors": "1.0.2",
37
37
  "terser": "5.43.1",
38
- "clean-css": "5.3.3",
39
38
  "less-loader": "10.2.0",
40
39
  "mini-css-extract-plugin": "1.3.3",
41
40
  "postcss-loader": "7.2.4",