@node-minify/yui 8.0.0-beta.0 → 8.0.1-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.js CHANGED
@@ -66,3 +66,4 @@ var src_default = minifyYUI;
66
66
  * Copyright(c) 2011-2022 Rodolphe Stoclin
67
67
  * MIT Licensed
68
68
  */
69
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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// interface Options {\n// // sourceMap?: { filename: string };\n// // _sourceMap?: { url: string } | boolean;\n// }\n\n// interface Settings {\n// options: Options;\n// content: string;\n// output: string;\n// type: string;\n// sync: boolean;\n// buffer: number;\n// }\n\n// interface MinifierOptions {\n// settings: Settings;\n// content: string /* | Dictionary<string> */;\n// callback: Function;\n// index: number;\n// }\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 */\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 */\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 */\n\nexport default minifyYUI;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,kBAAiB;AACjB,mBAAsB;AACtB,iBAA+B;AA2B/B,IAAM,SAAS,YAAAA,QAAK,UAAU,YAAY,mCAAmC;AAU7E,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;AAMA,IAAM,aAAa,CAAC,OAAO,MAAM,YAAsB;AACrD,SAAO,CAAC,QAAQ,aAAa,QAAQ,UAAU,IAAI,EAAE,OAAO,mBAAM,UAAU,WAAW,CAAC,CAAC,CAAC;AAC5F;AAMA,IAAO,cAAQ;","names":["path","content"]}
package/dist/index.mjs CHANGED
@@ -38,3 +38,4 @@ export {
38
38
  * Copyright(c) 2011-2022 Rodolphe Stoclin
39
39
  * MIT Licensed
40
40
  */
41
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +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// interface Options {\n// // sourceMap?: { filename: string };\n// // _sourceMap?: { url: string } | boolean;\n// }\n\n// interface Settings {\n// options: Options;\n// content: string;\n// output: string;\n// type: string;\n// sync: boolean;\n// buffer: number;\n// }\n\n// interface MinifierOptions {\n// settings: Settings;\n// content: string /* | Dictionary<string> */;\n// callback: Function;\n// index: number;\n// }\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 */\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 */\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 */\n\nexport default minifyYUI;\n"],"mappings":";AAUA,OAAO,UAAU;AACjB,SAAS,aAAa;AACtB,SAAS,sBAAsB;AA2B/B,IAAM,SAAS,KAAK,UAAU,YAAY,mCAAmC;AAU7E,IAAM,YAAY,CAAC,EAAE,UAAU,SAAS,UAAU,MAAM,MAAuB;AAC7E,SAAO,eAAe;AAAA,IACpB,MAAM,WAAW,YAAY,SAAS,MAAM,YAAY,SAAS,OAAO;AAAA,IACxE,MAAM;AAAA,IACN;AAAA,IACA,UAAU,CAAC,KAAYA,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,cAAM,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;AAMA,IAAM,aAAa,CAAC,OAAO,MAAM,YAAsB;AACrD,SAAO,CAAC,QAAQ,aAAa,QAAQ,UAAU,IAAI,EAAE,OAAO,MAAM,UAAU,WAAW,CAAC,CAAC,CAAC;AAC5F;AAMA,IAAO,cAAQ;","names":["content"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-minify/yui",
3
- "version": "8.0.0-beta.0",
3
+ "version": "8.0.1-beta.0",
4
4
  "description": "yui - yahoo compressor plugin for @node-minify",
5
5
  "keywords": [
6
6
  "compressor",
@@ -41,15 +41,15 @@
41
41
  },
42
42
  "scripts": {
43
43
  "clean": "pnpm dlx rimraf dist",
44
- "build": "npm run clean && tsup src/index.ts --format cjs,esm --dts --clean",
44
+ "build": "npm run clean && tsup src/index.ts --format cjs,esm --dts --clean --sourcemap",
45
45
  "prepublishOnly": "npm run build"
46
46
  },
47
47
  "dependencies": {
48
- "@node-minify/run": "8.0.0-beta.0",
49
- "@node-minify/utils": "8.0.0-beta.0"
48
+ "@node-minify/run": "8.0.1-beta.0",
49
+ "@node-minify/utils": "8.0.1-beta.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@node-minify/types": "8.0.0-beta.0"
52
+ "@node-minify/types": "8.0.1-beta.0"
53
53
  },
54
- "gitHead": "0507c6190577e1939997a8231b07952ba167a780"
54
+ "gitHead": "35a8a41ec86a11cbec05d8a7db9113475ece2cef"
55
55
  }