@node-minify/yui 6.4.0 → 7.1.0
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/lib/yui.js +3 -10
- package/package.json +5 -5
package/lib/yui.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _path = _interopRequireDefault(require("path"));
|
|
4
|
-
|
|
5
4
|
var _utils = require("@node-minify/utils");
|
|
6
|
-
|
|
7
5
|
var _run = require("@node-minify/run");
|
|
8
|
-
|
|
9
6
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
11
7
|
/*!
|
|
12
8
|
* node-minify
|
|
13
9
|
* Copyright(c) 2011-2022 Rodolphe Stoclin
|
|
@@ -22,6 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
22
18
|
* Module variables.
|
|
23
19
|
*/
|
|
24
20
|
const binYui = _path.default.normalize(__dirname + '/binaries/yuicompressor-2.4.7.jar');
|
|
21
|
+
|
|
25
22
|
/**
|
|
26
23
|
* Run YUI Compressor.
|
|
27
24
|
*
|
|
@@ -30,7 +27,6 @@ const binYui = _path.default.normalize(__dirname + '/binaries/yuicompressor-2.4.
|
|
|
30
27
|
* @param {Function} callback
|
|
31
28
|
*/
|
|
32
29
|
|
|
33
|
-
|
|
34
30
|
const minifyYUI = ({
|
|
35
31
|
settings,
|
|
36
32
|
content,
|
|
@@ -49,7 +45,6 @@ const minifyYUI = ({
|
|
|
49
45
|
throw err;
|
|
50
46
|
}
|
|
51
47
|
}
|
|
52
|
-
|
|
53
48
|
if (!settings.content) {
|
|
54
49
|
_utils.utils.writeFile({
|
|
55
50
|
file: settings.output,
|
|
@@ -57,26 +52,24 @@ const minifyYUI = ({
|
|
|
57
52
|
index
|
|
58
53
|
});
|
|
59
54
|
}
|
|
60
|
-
|
|
61
55
|
if (callback) {
|
|
62
56
|
return callback(null, content);
|
|
63
57
|
}
|
|
64
|
-
|
|
65
58
|
return content;
|
|
66
59
|
}
|
|
67
60
|
});
|
|
68
61
|
};
|
|
62
|
+
|
|
69
63
|
/**
|
|
70
64
|
* YUI Compressor CSS command line.
|
|
71
65
|
*/
|
|
72
66
|
|
|
73
|
-
|
|
74
67
|
const yuiCommand = (type = 'js', options) => {
|
|
75
68
|
return ['-jar', '-Xss2048k', binYui, '--type', type].concat(_utils.utils.buildArgs(options || {}));
|
|
76
69
|
};
|
|
70
|
+
|
|
77
71
|
/**
|
|
78
72
|
* Expose `minifyYUI()`.
|
|
79
73
|
*/
|
|
80
74
|
|
|
81
|
-
|
|
82
75
|
module.exports = minifyYUI;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-minify/yui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "yui - yahoo compressor plugin for @node-minify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compressor",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "lib/yui.js",
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": ">=
|
|
16
|
+
"node": ">=14.0.0"
|
|
17
17
|
},
|
|
18
18
|
"directories": {
|
|
19
19
|
"lib": "lib",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"url": "https://github.com/srod/node-minify/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@node-minify/run": "^
|
|
37
|
-
"@node-minify/utils": "^
|
|
36
|
+
"@node-minify/run": "^7.1.0",
|
|
37
|
+
"@node-minify/utils": "^7.1.0"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "94cef2d5d653c3bddc3e603b4e25c135b0b6f4b3"
|
|
40
40
|
}
|