@node-minify/uglify-es 8.0.1-beta.0 → 8.0.2-beta.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/dist/index.d.ts +4 -8
- package/dist/index.js +3 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -17,13 +17,9 @@ interface SettingsUglifyES extends Omit<Settings, 'options'> {
|
|
|
17
17
|
interface MinifierOptionsUglifyES extends Omit<MinifierOptions, 'settings'> {
|
|
18
18
|
settings: SettingsUglifyES;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* @param {String} content
|
|
25
|
-
* @param {Function} callback
|
|
26
|
-
*/
|
|
27
|
-
declare const minifyUglifyES: ({ settings, content, callback, index }: MinifierOptionsUglifyES) => any;
|
|
20
|
+
declare const minifyUglifyES: {
|
|
21
|
+
({ settings, content, callback, index }: MinifierOptionsUglifyES): any;
|
|
22
|
+
default: any;
|
|
23
|
+
};
|
|
28
24
|
|
|
29
25
|
export { minifyUglifyES as default };
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
8
|
var __copyProps = (to, from, except, desc) => {
|
|
12
9
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
10
|
for (let key of __getOwnPropNames(from))
|
|
@@ -20,14 +17,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
20
17
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
18
|
mod
|
|
22
19
|
));
|
|
23
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
20
|
|
|
25
21
|
// src/index.ts
|
|
26
|
-
var src_exports = {};
|
|
27
|
-
__export(src_exports, {
|
|
28
|
-
default: () => src_default
|
|
29
|
-
});
|
|
30
|
-
module.exports = __toCommonJS(src_exports);
|
|
31
22
|
var import_uglify_es = __toESM(require("uglify-es"));
|
|
32
23
|
var import_utils = require("@node-minify/utils");
|
|
33
24
|
var minifyUglifyES = ({ settings, content, callback, index }) => {
|
|
@@ -52,9 +43,8 @@ var minifyUglifyES = ({ settings, content, callback, index }) => {
|
|
|
52
43
|
}
|
|
53
44
|
return contentMinified.code;
|
|
54
45
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
0 && (module.exports = {});
|
|
46
|
+
minifyUglifyES.default = minifyUglifyES;
|
|
47
|
+
module.exports = minifyUglifyES;
|
|
58
48
|
/*!
|
|
59
49
|
* node-minify
|
|
60
50
|
* Copyright(c) 2011-2022 Rodolphe Stoclin
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-2022 Rodolphe Stoclin\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\nimport uglifyES from 'uglify-es';\nimport { utils } from '@node-minify/utils';\nimport { MinifierOptions, Options, Settings, Dictionary } from '@node-minify/types';\n\ninterface OptionsUglifyES extends Omit<Options, 'sourceMap'> {\n sourceMap?: { filename: string };\n}\n\
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-2022 Rodolphe Stoclin\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\nimport uglifyES from 'uglify-es';\nimport { utils } from '@node-minify/utils';\nimport { MinifierOptions, Options, Settings, Dictionary } from '@node-minify/types';\n\ninterface OptionsUglifyES extends Omit<Options, 'sourceMap'> {\n sourceMap?: { filename: string };\n}\n\ninterface SettingsUglifyES extends Omit<Settings, 'options'> {\n options: OptionsUglifyES;\n}\n\ninterface MinifierOptionsUglifyES extends Omit<MinifierOptions, 'settings'> {\n settings: SettingsUglifyES;\n}\n\n/**\n * Run uglifyES.\n *\n * @param {Object} settings\n * @param {String} content\n * @param {Function} callback\n */\nconst minifyUglifyES = ({ settings, content, callback, index }: MinifierOptionsUglifyES) => {\n let content2: string | Dictionary<string> = content || '';\n if (settings && typeof settings.options.sourceMap === 'object') {\n content2 = { [settings.options.sourceMap.filename || '']: content || '' };\n }\n const contentMinified = uglifyES.minify(content2, settings && settings.options);\n if (contentMinified.error) {\n if (callback) {\n return callback(contentMinified.error);\n }\n }\n if (contentMinified.map && settings && settings.options.sourceMap) {\n utils.writeFile({ file: `${settings.output}.map`, content: contentMinified.map, index });\n }\n if (settings && !settings.content) {\n utils.writeFile({ file: settings.output, content: contentMinified.code, index });\n }\n if (callback) {\n return callback(null, contentMinified.code);\n }\n return contentMinified.code;\n};\n\n/**\n * Expose `minifyUglifyES()`.\n */\nminifyUglifyES.default = minifyUglifyES;\nexport = minifyUglifyES;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA,uBAAqB;AACrB,mBAAsB;AAsBtB,IAAM,iBAAiB,CAAC,EAAE,UAAU,SAAS,UAAU,MAAM,MAA+B;AAC1F,MAAI,WAAwC,WAAW;AACvD,MAAI,YAAY,OAAO,SAAS,QAAQ,cAAc,UAAU;AAC9D,eAAW,EAAE,CAAC,SAAS,QAAQ,UAAU,YAAY,KAAK,WAAW,GAAG;AAAA,EAC1E;AACA,QAAM,kBAAkB,iBAAAA,QAAS,OAAO,UAAU,YAAY,SAAS,OAAO;AAC9E,MAAI,gBAAgB,OAAO;AACzB,QAAI,UAAU;AACZ,aAAO,SAAS,gBAAgB,KAAK;AAAA,IACvC;AAAA,EACF;AACA,MAAI,gBAAgB,OAAO,YAAY,SAAS,QAAQ,WAAW;AACjE,uBAAM,UAAU,EAAE,MAAM,GAAG,SAAS,cAAc,SAAS,gBAAgB,KAAK,MAAM,CAAC;AAAA,EACzF;AACA,MAAI,YAAY,CAAC,SAAS,SAAS;AACjC,uBAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAS,gBAAgB,MAAM,MAAM,CAAC;AAAA,EACjF;AACA,MAAI,UAAU;AACZ,WAAO,SAAS,MAAM,gBAAgB,IAAI;AAAA,EAC5C;AACA,SAAO,gBAAgB;AACzB;AAKA,eAAe,UAAU;AACzB,iBAAS;","names":["uglifyES"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,32 +1,40 @@
|
|
|
1
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
3
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4
|
+
};
|
|
5
|
+
|
|
1
6
|
// src/index.ts
|
|
2
7
|
import uglifyES from "uglify-es";
|
|
3
8
|
import { utils } from "@node-minify/utils";
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
var require_src = __commonJS({
|
|
10
|
+
"src/index.ts"(exports, module) {
|
|
11
|
+
var minifyUglifyES = ({ settings, content, callback, index }) => {
|
|
12
|
+
let content2 = content || "";
|
|
13
|
+
if (settings && typeof settings.options.sourceMap === "object") {
|
|
14
|
+
content2 = { [settings.options.sourceMap.filename || ""]: content || "" };
|
|
15
|
+
}
|
|
16
|
+
const contentMinified = uglifyES.minify(content2, settings && settings.options);
|
|
17
|
+
if (contentMinified.error) {
|
|
18
|
+
if (callback) {
|
|
19
|
+
return callback(contentMinified.error);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (contentMinified.map && settings && settings.options.sourceMap) {
|
|
23
|
+
utils.writeFile({ file: `${settings.output}.map`, content: contentMinified.map, index });
|
|
24
|
+
}
|
|
25
|
+
if (settings && !settings.content) {
|
|
26
|
+
utils.writeFile({ file: settings.output, content: contentMinified.code, index });
|
|
27
|
+
}
|
|
28
|
+
if (callback) {
|
|
29
|
+
return callback(null, contentMinified.code);
|
|
30
|
+
}
|
|
31
|
+
return contentMinified.code;
|
|
32
|
+
};
|
|
33
|
+
minifyUglifyES.default = minifyUglifyES;
|
|
34
|
+
module.exports = minifyUglifyES;
|
|
20
35
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
return contentMinified.code;
|
|
25
|
-
};
|
|
26
|
-
var src_default = minifyUglifyES;
|
|
27
|
-
export {
|
|
28
|
-
src_default as default
|
|
29
|
-
};
|
|
36
|
+
});
|
|
37
|
+
export default require_src();
|
|
30
38
|
/*!
|
|
31
39
|
* node-minify
|
|
32
40
|
* Copyright(c) 2011-2022 Rodolphe Stoclin
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-2022 Rodolphe Stoclin\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\nimport uglifyES from 'uglify-es';\nimport { utils } from '@node-minify/utils';\nimport { MinifierOptions, Options, Settings, Dictionary } from '@node-minify/types';\n\ninterface OptionsUglifyES extends Omit<Options, 'sourceMap'> {\n sourceMap?: { filename: string };\n}\n\
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-2022 Rodolphe Stoclin\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\nimport uglifyES from 'uglify-es';\nimport { utils } from '@node-minify/utils';\nimport { MinifierOptions, Options, Settings, Dictionary } from '@node-minify/types';\n\ninterface OptionsUglifyES extends Omit<Options, 'sourceMap'> {\n sourceMap?: { filename: string };\n}\n\ninterface SettingsUglifyES extends Omit<Settings, 'options'> {\n options: OptionsUglifyES;\n}\n\ninterface MinifierOptionsUglifyES extends Omit<MinifierOptions, 'settings'> {\n settings: SettingsUglifyES;\n}\n\n/**\n * Run uglifyES.\n *\n * @param {Object} settings\n * @param {String} content\n * @param {Function} callback\n */\nconst minifyUglifyES = ({ settings, content, callback, index }: MinifierOptionsUglifyES) => {\n let content2: string | Dictionary<string> = content || '';\n if (settings && typeof settings.options.sourceMap === 'object') {\n content2 = { [settings.options.sourceMap.filename || '']: content || '' };\n }\n const contentMinified = uglifyES.minify(content2, settings && settings.options);\n if (contentMinified.error) {\n if (callback) {\n return callback(contentMinified.error);\n }\n }\n if (contentMinified.map && settings && settings.options.sourceMap) {\n utils.writeFile({ file: `${settings.output}.map`, content: contentMinified.map, index });\n }\n if (settings && !settings.content) {\n utils.writeFile({ file: settings.output, content: contentMinified.code, index });\n }\n if (callback) {\n return callback(null, contentMinified.code);\n }\n return contentMinified.code;\n};\n\n/**\n * Expose `minifyUglifyES()`.\n */\nminifyUglifyES.default = minifyUglifyES;\nexport = minifyUglifyES;\n"],"mappings":";;;;;;AASA,OAAO,cAAc;AACrB,SAAS,aAAa;AAVtB;AAAA;AAgCA,QAAM,iBAAiB,CAAC,EAAE,UAAU,SAAS,UAAU,MAAM,MAA+B;AAC1F,UAAI,WAAwC,WAAW;AACvD,UAAI,YAAY,OAAO,SAAS,QAAQ,cAAc,UAAU;AAC9D,mBAAW,EAAE,CAAC,SAAS,QAAQ,UAAU,YAAY,KAAK,WAAW,GAAG;AAAA,MAC1E;AACA,YAAM,kBAAkB,SAAS,OAAO,UAAU,YAAY,SAAS,OAAO;AAC9E,UAAI,gBAAgB,OAAO;AACzB,YAAI,UAAU;AACZ,iBAAO,SAAS,gBAAgB,KAAK;AAAA,QACvC;AAAA,MACF;AACA,UAAI,gBAAgB,OAAO,YAAY,SAAS,QAAQ,WAAW;AACjE,cAAM,UAAU,EAAE,MAAM,GAAG,SAAS,cAAc,SAAS,gBAAgB,KAAK,MAAM,CAAC;AAAA,MACzF;AACA,UAAI,YAAY,CAAC,SAAS,SAAS;AACjC,cAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAS,gBAAgB,MAAM,MAAM,CAAC;AAAA,MACjF;AACA,UAAI,UAAU;AACZ,eAAO,SAAS,MAAM,gBAAgB,IAAI;AAAA,MAC5C;AACA,aAAO,gBAAgB;AAAA,IACzB;AAKA,mBAAe,UAAU;AACzB,qBAAS;AAAA;AAAA;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-minify/uglify-es",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2-beta.0",
|
|
4
4
|
"description": "uglify-es plugin for @node-minify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compressor",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"prepublishOnly": "npm run build"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@node-minify/utils": "8.0.
|
|
48
|
+
"@node-minify/utils": "8.0.2-beta.0",
|
|
49
49
|
"uglify-es": "3.3.9"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@node-minify/types": "8.0.
|
|
52
|
+
"@node-minify/types": "8.0.2-beta.0",
|
|
53
53
|
"@types/uglify-es": "^3.0.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "bd2fe186257749fcb9bf7a9ff1ce61fb922c4ade"
|
|
56
56
|
}
|