@node-minify/google-closure-compiler 6.2.0 → 6.4.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/LICENSE +1 -1
- package/lib/google-closure-compiler.js +26 -26
- package/package.json +4 -4
package/LICENSE
CHANGED
|
@@ -6,28 +6,28 @@ var _utils = require("@node-minify/utils");
|
|
|
6
6
|
|
|
7
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
8
|
|
|
9
|
-
/*!
|
|
10
|
-
* node-minify
|
|
11
|
-
* Copyright(c) 2011-
|
|
12
|
-
* MIT Licensed
|
|
9
|
+
/*!
|
|
10
|
+
* node-minify
|
|
11
|
+
* Copyright(c) 2011-2022 Rodolphe Stoclin
|
|
12
|
+
* MIT Licensed
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* Module dependencies.
|
|
15
|
+
/**
|
|
16
|
+
* Module dependencies.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* Module variables.
|
|
19
|
+
/**
|
|
20
|
+
* Module variables.
|
|
21
21
|
*/
|
|
22
22
|
const ClosureCompiler = _googleClosureCompiler.default.jsCompiler; // the allowed flags, taken from https://github.com/google/closure-compiler
|
|
23
23
|
|
|
24
24
|
const allowedFlags = ['angularPass', 'applyInputSourceMaps', 'assumeFunctionWrapper', 'checksOnly', 'compilationLevel', 'createSourceMap', 'dartPass', 'defines', 'env', 'externs', 'exportLocalPropertyDefinitions', 'generateExports', 'languageIn', 'languageOut', 'newTypeInf', 'outputWrapper', 'polymerVersion', 'preserveTypeAnnotations', 'processCommonJsModules', 'renamePrefixNamespace', 'rewritePolyfills', 'useTypesForOptimization', 'warningLevel'];
|
|
25
|
-
/**
|
|
26
|
-
* Run Google Closure Compiler.
|
|
27
|
-
*
|
|
28
|
-
* @param {Object} settings
|
|
29
|
-
* @param {String} content
|
|
30
|
-
* @param {Function} callback
|
|
25
|
+
/**
|
|
26
|
+
* Run Google Closure Compiler.
|
|
27
|
+
*
|
|
28
|
+
* @param {Object} settings
|
|
29
|
+
* @param {String} content
|
|
30
|
+
* @param {Function} callback
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
const minifyGCC = ({
|
|
@@ -53,11 +53,11 @@ const minifyGCC = ({
|
|
|
53
53
|
index
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Write GCC sourceMap
|
|
58
|
-
* If the createSourceMap option is passed we'll write the sourceMap file
|
|
59
|
-
* If createSourceMap is a boolean we'll append .map to the settings.output file path
|
|
60
|
-
* otherwise use createSourceMap as the file path.
|
|
56
|
+
/**
|
|
57
|
+
* Write GCC sourceMap
|
|
58
|
+
* If the createSourceMap option is passed we'll write the sourceMap file
|
|
59
|
+
* If createSourceMap is a boolean we'll append .map to the settings.output file path
|
|
60
|
+
* otherwise use createSourceMap as the file path.
|
|
61
61
|
*/
|
|
62
62
|
|
|
63
63
|
|
|
@@ -77,11 +77,11 @@ const minifyGCC = ({
|
|
|
77
77
|
|
|
78
78
|
return contentMinified.compiledCode;
|
|
79
79
|
};
|
|
80
|
-
/**
|
|
81
|
-
* Adds any valid options passed in the options parameters to the flags parameter and returns the flags object.
|
|
82
|
-
* @param {Object} flags
|
|
83
|
-
* @param {Object} options
|
|
84
|
-
* @returns {Object} flags
|
|
80
|
+
/**
|
|
81
|
+
* Adds any valid options passed in the options parameters to the flags parameter and returns the flags object.
|
|
82
|
+
* @param {Object} flags
|
|
83
|
+
* @param {Object} options
|
|
84
|
+
* @returns {Object} flags
|
|
85
85
|
*/
|
|
86
86
|
|
|
87
87
|
|
|
@@ -93,8 +93,8 @@ const applyOptions = (flags, options) => {
|
|
|
93
93
|
Object.keys(options).filter(option => allowedFlags.indexOf(option) > -1).forEach(option => flags[option] = options[option]);
|
|
94
94
|
return flags;
|
|
95
95
|
};
|
|
96
|
-
/**
|
|
97
|
-
* Expose `minifyGCC()`.
|
|
96
|
+
/**
|
|
97
|
+
* Expose `minifyGCC()`.
|
|
98
98
|
*/
|
|
99
99
|
|
|
100
100
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-minify/google-closure-compiler",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"description": "google closure compiler plugin for @node-minify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compressor",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"main": "lib/google-closure-compiler.js",
|
|
16
16
|
"engines": {
|
|
17
|
-
"node": ">=
|
|
17
|
+
"node": ">=12.0.0"
|
|
18
18
|
},
|
|
19
19
|
"directories": {
|
|
20
20
|
"lib": "lib",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"url": "https://github.com/srod/node-minify/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@node-minify/utils": "^6.
|
|
37
|
+
"@node-minify/utils": "^6.4.0",
|
|
38
38
|
"google-closure-compiler": "20200719.0.0"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "d529747a661487597e9be510d3d9e2df1bc0f556"
|
|
41
41
|
}
|