uglify-js-minify-css-allfiles 1.2.8 → 1.2.9

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/README.md CHANGED
@@ -7,6 +7,7 @@
7
7
  - please email me copstyle86@gmail.com or use github issue tab.
8
8
 
9
9
  ## History
10
+ - When Css Warnings is exist, not minify any code - 2022/04/13
10
11
  - UglifyJS Updated removing 'console.info, console.warn, console.error'. - 2021/11/12
11
12
  - UglifyJS Updated working without 'console.log' not console.error, info etc. - 2021/03/17
12
13
  - UglifyJS Updated and you can uglify js even es6 sentences! - 2020/11/03
package/dist/module.js CHANGED
@@ -49,8 +49,16 @@ module.exports = async function minifyAll(contentsPath, exceptFolder) {
49
49
  }).code;
50
50
  writeFiles(paths, result);
51
51
  } else if (paths.substr(-4) === DIRECTORY.STYLESHEET) {
52
- result = new cleanCSS(CSSOPTIONS).minify(code).styles;
53
- writeFiles(paths, result);
52
+ new cleanCSS(CSSOPTIONS).minify(code, function (error, output) {
53
+ if (0 < output.warnings.length) {
54
+ console.error('CSS FILE ERROR!', output.warnings);
55
+ writeFiles(paths, null);
56
+ return;
57
+ } else {
58
+ result = new cleanCSS(CSSOPTIONS).minify(code).styles;
59
+ writeFiles(paths, result);
60
+ }
61
+ });
54
62
  }
55
63
  });
56
64
 
@@ -74,6 +82,8 @@ module.exports = async function minifyAll(contentsPath, exceptFolder) {
74
82
  }
75
83
  }
76
84
 
77
- console.info('file change ended... \nerrorFilesNumber : ' + errorFilesNumber);
78
- console.info('*******errorFileObjects******* : ' + errorFileObjects);
85
+ if (0 < errorFileObjects.length) {
86
+ console.info('file change ended... \nerrorFilesNumber : ' + errorFilesNumber);
87
+ console.info('*******errorFileObjects******* : ' + errorFileObjects);
88
+ }
79
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uglify-js-minify-css-allfiles",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "you will be able to minify all files as same file names which is js or css",
5
5
  "main": "minify.js",
6
6
  "scripts": {
@@ -0,0 +1 @@
1
+ function dragon(){console.assert("sdsfdsd")}
@@ -0,0 +1 @@
1
+ function dragon(){console.assert("sdsfdsd")}
@@ -0,0 +1 @@
1
+ function dragon(){console.assert("sdsfdsd")}
@@ -0,0 +1 @@
1
+ function dragon(){console.assert("sdsfdsd")}
@@ -0,0 +1 @@
1
+ function dragon(){console.assert("sdsfdsd")}
@@ -0,0 +1 @@
1
+ function dragon(){console.assert("sdsfdsd")}
@@ -0,0 +1,19 @@
1
+ @charset "utf-8";
2
+ main {
3
+ display: block;
4
+ font-size: 30px;
5
+ -webkit-text-size-adjust: auto;
6
+ appearance: none;
7
+ }
8
+ @keyframes identifier {
9
+ 0% {
10
+ display: block;
11
+ }
12
+ 100% {
13
+ display: none;
14
+ }
15
+ }
16
+ span {
17
+ display: block;
18
+ font-size: 50px;
19
+ }
@@ -0,0 +1 @@
1
+ function dragon(){console.assert("sdsfdsd")}