@node-minify/yui 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 +38 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -6,13 +6,9 @@ import { MinifierOptions } from '@node-minify/types';
|
|
|
6
6
|
* MIT Licensed
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* @param {String} content
|
|
14
|
-
* @param {Function} callback
|
|
15
|
-
*/
|
|
16
|
-
declare const minifyYUI: ({ settings, content, callback, index }: MinifierOptions) => any;
|
|
9
|
+
declare const minifyYUI: {
|
|
10
|
+
({ settings, content, callback, index }: MinifierOptions): any;
|
|
11
|
+
default: any;
|
|
12
|
+
};
|
|
17
13
|
|
|
18
14
|
export { minifyYUI 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_path = __toESM(require("path"));
|
|
32
23
|
var import_utils = require("@node-minify/utils");
|
|
33
24
|
var import_run = require("@node-minify/run");
|
|
@@ -58,9 +49,8 @@ var minifyYUI = ({ settings, content, callback, index }) => {
|
|
|
58
49
|
var yuiCommand = (type = "js", options) => {
|
|
59
50
|
return ["-jar", "-Xss2048k", binYui, "--type", type].concat(import_utils.utils.buildArgs(options || {}));
|
|
60
51
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
0 && (module.exports = {});
|
|
52
|
+
minifyYUI.default = minifyYUI;
|
|
53
|
+
module.exports = minifyYUI;
|
|
64
54
|
/*!
|
|
65
55
|
* node-minify
|
|
66
56
|
* 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 */\n\nimport path from 'path';\nimport { utils } from '@node-minify/utils';\nimport { runCommandLine } from '@node-minify/run';\nimport { MinifierOptions, Options } from '@node-minify/types';\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 */\n\nimport path from 'path';\nimport { utils } from '@node-minify/utils';\nimport { runCommandLine } from '@node-minify/run';\nimport { MinifierOptions, Options } from '@node-minify/types';\n\n/**\n * Module variables.\n */\nconst binYui = path.normalize(__dirname + '/binaries/yuicompressor-2.4.7.jar');\n\n/**\n * Run YUI Compressor.\n *\n * @param {Object} settings\n * @param {String} content\n * @param {Function} callback\n */\nconst minifyYUI = ({ settings, content, callback, index }: MinifierOptions) => {\n return runCommandLine({\n args: yuiCommand(settings && settings.type, settings && settings.options),\n data: content,\n settings,\n callback: (err: Error, content: string) => {\n if (err) {\n if (callback) {\n return callback(err);\n } else {\n throw err;\n }\n }\n if (settings && !settings.content) {\n utils.writeFile({ file: settings.output, content, index });\n }\n if (callback) {\n return callback(null, content);\n }\n return content;\n }\n });\n};\n\n/**\n * YUI Compressor CSS command line.\n */\nconst yuiCommand = (type = 'js', options?: Options) => {\n return ['-jar', '-Xss2048k', binYui, '--type', type].concat(utils.buildArgs(options || {}));\n};\n\n/**\n * Expose `minifyYUI()`.\n */\nminifyYUI.default = minifyYUI;\nexport = minifyYUI;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAUA,kBAAiB;AACjB,mBAAsB;AACtB,iBAA+B;AAM/B,IAAM,SAAS,YAAAA,QAAK,UAAU,YAAY,mCAAmC;AAS7E,IAAM,YAAY,CAAC,EAAE,UAAU,SAAS,UAAU,MAAM,MAAuB;AAC7E,aAAO,2BAAe;AAAA,IACpB,MAAM,WAAW,YAAY,SAAS,MAAM,YAAY,SAAS,OAAO;AAAA,IACxE,MAAM;AAAA,IACN;AAAA,IACA,UAAU,CAAC,KAAYC,aAAoB;AACzC,UAAI,KAAK;AACP,YAAI,UAAU;AACZ,iBAAO,SAAS,GAAG;AAAA,QACrB,OAAO;AACL,gBAAM;AAAA,QACR;AAAA,MACF;AACA,UAAI,YAAY,CAAC,SAAS,SAAS;AACjC,2BAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAAA,UAAS,MAAM,CAAC;AAAA,MAC3D;AACA,UAAI,UAAU;AACZ,eAAO,SAAS,MAAMA,QAAO;AAAA,MAC/B;AACA,aAAOA;AAAA,IACT;AAAA,EACF,CAAC;AACH;AAKA,IAAM,aAAa,CAAC,OAAO,MAAM,YAAsB;AACrD,SAAO,CAAC,QAAQ,aAAa,QAAQ,UAAU,IAAI,EAAE,OAAO,mBAAM,UAAU,WAAW,CAAC,CAAC,CAAC;AAC5F;AAKA,UAAU,UAAU;AACpB,iBAAS;","names":["path","content"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,38 +1,46 @@
|
|
|
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 path from "path";
|
|
3
8
|
import { utils } from "@node-minify/utils";
|
|
4
9
|
import { runCommandLine } from "@node-minify/run";
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
var require_src = __commonJS({
|
|
11
|
+
"src/index.ts"(exports, module) {
|
|
12
|
+
var binYui = path.normalize(__dirname + "/binaries/yuicompressor-2.4.7.jar");
|
|
13
|
+
var minifyYUI = ({ settings, content, callback, index }) => {
|
|
14
|
+
return runCommandLine({
|
|
15
|
+
args: yuiCommand(settings && settings.type, settings && settings.options),
|
|
16
|
+
data: content,
|
|
17
|
+
settings,
|
|
18
|
+
callback: (err, content2) => {
|
|
19
|
+
if (err) {
|
|
20
|
+
if (callback) {
|
|
21
|
+
return callback(err);
|
|
22
|
+
} else {
|
|
23
|
+
throw err;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (settings && !settings.content) {
|
|
27
|
+
utils.writeFile({ file: settings.output, content: content2, index });
|
|
28
|
+
}
|
|
29
|
+
if (callback) {
|
|
30
|
+
return callback(null, content2);
|
|
31
|
+
}
|
|
32
|
+
return content2;
|
|
17
33
|
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
var yuiCommand = (type = "js", options) => {
|
|
30
|
-
return ["-jar", "-Xss2048k", binYui, "--type", type].concat(utils.buildArgs(options || {}));
|
|
31
|
-
};
|
|
32
|
-
var src_default = minifyYUI;
|
|
33
|
-
export {
|
|
34
|
-
src_default as default
|
|
35
|
-
};
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var yuiCommand = (type = "js", options) => {
|
|
37
|
+
return ["-jar", "-Xss2048k", binYui, "--type", type].concat(utils.buildArgs(options || {}));
|
|
38
|
+
};
|
|
39
|
+
minifyYUI.default = minifyYUI;
|
|
40
|
+
module.exports = minifyYUI;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export default require_src();
|
|
36
44
|
/*!
|
|
37
45
|
* node-minify
|
|
38
46
|
* 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 */\n\nimport path from 'path';\nimport { utils } from '@node-minify/utils';\nimport { runCommandLine } from '@node-minify/run';\nimport { MinifierOptions, Options } from '@node-minify/types';\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 */\n\nimport path from 'path';\nimport { utils } from '@node-minify/utils';\nimport { runCommandLine } from '@node-minify/run';\nimport { MinifierOptions, Options } from '@node-minify/types';\n\n/**\n * Module variables.\n */\nconst binYui = path.normalize(__dirname + '/binaries/yuicompressor-2.4.7.jar');\n\n/**\n * Run YUI Compressor.\n *\n * @param {Object} settings\n * @param {String} content\n * @param {Function} callback\n */\nconst minifyYUI = ({ settings, content, callback, index }: MinifierOptions) => {\n return runCommandLine({\n args: yuiCommand(settings && settings.type, settings && settings.options),\n data: content,\n settings,\n callback: (err: Error, content: string) => {\n if (err) {\n if (callback) {\n return callback(err);\n } else {\n throw err;\n }\n }\n if (settings && !settings.content) {\n utils.writeFile({ file: settings.output, content, index });\n }\n if (callback) {\n return callback(null, content);\n }\n return content;\n }\n });\n};\n\n/**\n * YUI Compressor CSS command line.\n */\nconst yuiCommand = (type = 'js', options?: Options) => {\n return ['-jar', '-Xss2048k', binYui, '--type', type].concat(utils.buildArgs(options || {}));\n};\n\n/**\n * Expose `minifyYUI()`.\n */\nminifyYUI.default = minifyYUI;\nexport = minifyYUI;\n"],"mappings":";;;;;;AAUA,OAAO,UAAU;AACjB,SAAS,aAAa;AACtB,SAAS,sBAAsB;AAZ/B;AAAA;AAkBA,QAAM,SAAS,KAAK,UAAU,YAAY,mCAAmC;AAS7E,QAAM,YAAY,CAAC,EAAE,UAAU,SAAS,UAAU,MAAM,MAAuB;AAC7E,aAAO,eAAe;AAAA,QACpB,MAAM,WAAW,YAAY,SAAS,MAAM,YAAY,SAAS,OAAO;AAAA,QACxE,MAAM;AAAA,QACN;AAAA,QACA,UAAU,CAAC,KAAYA,aAAoB;AACzC,cAAI,KAAK;AACP,gBAAI,UAAU;AACZ,qBAAO,SAAS,GAAG;AAAA,YACrB,OAAO;AACL,oBAAM;AAAA,YACR;AAAA,UACF;AACA,cAAI,YAAY,CAAC,SAAS,SAAS;AACjC,kBAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAAA,UAAS,MAAM,CAAC;AAAA,UAC3D;AACA,cAAI,UAAU;AACZ,mBAAO,SAAS,MAAMA,QAAO;AAAA,UAC/B;AACA,iBAAOA;AAAA,QACT;AAAA,MACF,CAAC;AAAA,IACH;AAKA,QAAM,aAAa,CAAC,OAAO,MAAM,YAAsB;AACrD,aAAO,CAAC,QAAQ,aAAa,QAAQ,UAAU,IAAI,EAAE,OAAO,MAAM,UAAU,WAAW,CAAC,CAAC,CAAC;AAAA,IAC5F;AAKA,cAAU,UAAU;AACpB,qBAAS;AAAA;AAAA;","names":["content"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-minify/yui",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2-beta.0",
|
|
4
4
|
"description": "yui - yahoo compressor plugin for @node-minify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compressor",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"prepublishOnly": "npm run build"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@node-minify/run": "8.0.
|
|
49
|
-
"@node-minify/utils": "8.0.
|
|
48
|
+
"@node-minify/run": "8.0.2-beta.0",
|
|
49
|
+
"@node-minify/utils": "8.0.2-beta.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@node-minify/types": "8.0.
|
|
52
|
+
"@node-minify/types": "8.0.2-beta.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "bd2fe186257749fcb9bf7a9ff1ce61fb922c4ade"
|
|
55
55
|
}
|