@node-minify/csso 8.0.2-beta.0 → 8.0.5-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/LICENSE +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/LICENSE
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import { MinifierOptions } from '@node-minify/types';
|
|
|
2
2
|
|
|
3
3
|
/*!
|
|
4
4
|
* node-minify
|
|
5
|
-
* Copyright(c) 2011-
|
|
5
|
+
* Copyright(c) 2011-2023 Rodolphe Stoclin
|
|
6
6
|
* MIT Licensed
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
declare const minifyCSSO: {
|
|
10
|
-
({ settings, content, callback, index }: MinifierOptions):
|
|
10
|
+
({ settings, content, callback, index }: MinifierOptions): string | void;
|
|
11
11
|
default: any;
|
|
12
12
|
};
|
|
13
13
|
|
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@ var import_csso = require("csso");
|
|
|
5
5
|
var import_utils = require("@node-minify/utils");
|
|
6
6
|
var minifyCSSO = ({ settings, content, callback, index }) => {
|
|
7
7
|
const contentMinified = (0, import_csso.minify)(content || "", settings && settings.options);
|
|
8
|
-
if (settings && !settings.content) {
|
|
9
|
-
import_utils.utils.writeFile({ file: settings.output, content: contentMinified.css, index });
|
|
8
|
+
if (settings && !settings.content && settings.output) {
|
|
9
|
+
settings.output && import_utils.utils.writeFile({ file: settings.output, content: contentMinified.css, index });
|
|
10
10
|
}
|
|
11
11
|
if (callback) {
|
|
12
12
|
return callback(null, contentMinified.css);
|
|
@@ -17,7 +17,7 @@ minifyCSSO.default = minifyCSSO;
|
|
|
17
17
|
module.exports = minifyCSSO;
|
|
18
18
|
/*!
|
|
19
19
|
* node-minify
|
|
20
|
-
* Copyright(c) 2011-
|
|
20
|
+
* Copyright(c) 2011-2023 Rodolphe Stoclin
|
|
21
21
|
* MIT Licensed
|
|
22
22
|
*/
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-2023 Rodolphe Stoclin\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\nimport { minify } from 'csso';\nimport { utils } from '@node-minify/utils';\nimport { MinifierOptions } from '@node-minify/types';\n\n/**\n * Run csso.\n *\n * @param {Object} settings\n * @param {String} content\n * @param {Function} callback\n */\nconst minifyCSSO = ({ settings, content, callback, index }: MinifierOptions) => {\n const contentMinified = minify(content || '', settings && settings.options);\n if (settings && !settings.content && settings.output) {\n settings.output && utils.writeFile({ file: settings.output, content: contentMinified.css, index });\n }\n if (callback) {\n return callback(null, contentMinified.css);\n }\n return contentMinified.css;\n};\n\n/**\n * Expose `minifyCSSO()`.\n */\nminifyCSSO.default = minifyCSSO;\nexport = minifyCSSO;\n"],"mappings":";;;AASA,kBAAuB;AACvB,mBAAsB;AAUtB,IAAM,aAAa,CAAC,EAAE,UAAU,SAAS,UAAU,MAAM,MAAuB;AAC9E,QAAM,sBAAkB,oBAAO,WAAW,IAAI,YAAY,SAAS,OAAO;AAC1E,MAAI,YAAY,CAAC,SAAS,WAAW,SAAS,QAAQ;AACpD,aAAS,UAAU,mBAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAS,gBAAgB,KAAK,MAAM,CAAC;AAAA,EACnG;AACA,MAAI,UAAU;AACZ,WAAO,SAAS,MAAM,gBAAgB,GAAG;AAAA,EAC3C;AACA,SAAO,gBAAgB;AACzB;AAKA,WAAW,UAAU;AACrB,iBAAS;","names":[]}
|
package/dist/index.mjs
CHANGED
|
@@ -10,8 +10,8 @@ var require_src = __commonJS({
|
|
|
10
10
|
"src/index.ts"(exports, module) {
|
|
11
11
|
var minifyCSSO = ({ settings, content, callback, index }) => {
|
|
12
12
|
const contentMinified = minify(content || "", settings && settings.options);
|
|
13
|
-
if (settings && !settings.content) {
|
|
14
|
-
utils.writeFile({ file: settings.output, content: contentMinified.css, index });
|
|
13
|
+
if (settings && !settings.content && settings.output) {
|
|
14
|
+
settings.output && utils.writeFile({ file: settings.output, content: contentMinified.css, index });
|
|
15
15
|
}
|
|
16
16
|
if (callback) {
|
|
17
17
|
return callback(null, contentMinified.css);
|
|
@@ -25,7 +25,7 @@ var require_src = __commonJS({
|
|
|
25
25
|
export default require_src();
|
|
26
26
|
/*!
|
|
27
27
|
* node-minify
|
|
28
|
-
* Copyright(c) 2011-
|
|
28
|
+
* Copyright(c) 2011-2023 Rodolphe Stoclin
|
|
29
29
|
* MIT Licensed
|
|
30
30
|
*/
|
|
31
31
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-2023 Rodolphe Stoclin\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\nimport { minify } from 'csso';\nimport { utils } from '@node-minify/utils';\nimport { MinifierOptions } from '@node-minify/types';\n\n/**\n * Run csso.\n *\n * @param {Object} settings\n * @param {String} content\n * @param {Function} callback\n */\nconst minifyCSSO = ({ settings, content, callback, index }: MinifierOptions) => {\n const contentMinified = minify(content || '', settings && settings.options);\n if (settings && !settings.content && settings.output) {\n settings.output && utils.writeFile({ file: settings.output, content: contentMinified.css, index });\n }\n if (callback) {\n return callback(null, contentMinified.css);\n }\n return contentMinified.css;\n};\n\n/**\n * Expose `minifyCSSO()`.\n */\nminifyCSSO.default = minifyCSSO;\nexport = minifyCSSO;\n"],"mappings":";;;;;;AASA,SAAS,cAAc;AACvB,SAAS,aAAa;AAVtB;AAAA;AAoBA,QAAM,aAAa,CAAC,EAAE,UAAU,SAAS,UAAU,MAAM,MAAuB;AAC9E,YAAM,kBAAkB,OAAO,WAAW,IAAI,YAAY,SAAS,OAAO;AAC1E,UAAI,YAAY,CAAC,SAAS,WAAW,SAAS,QAAQ;AACpD,iBAAS,UAAU,MAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAS,gBAAgB,KAAK,MAAM,CAAC;AAAA,MACnG;AACA,UAAI,UAAU;AACZ,eAAO,SAAS,MAAM,gBAAgB,GAAG;AAAA,MAC3C;AACA,aAAO,gBAAgB;AAAA,IACzB;AAKA,eAAW,UAAU;AACrB,qBAAS;AAAA;AAAA;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-minify/csso",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.5-beta.0",
|
|
4
4
|
"description": "csso plugin for @node-minify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compressor",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"homepage": "https://github.com/srod/node-minify/tree/master/packages/csso#readme",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"engines": {
|
|
15
|
-
"node": ">=
|
|
15
|
+
"node": ">=16.0.0"
|
|
16
16
|
},
|
|
17
17
|
"directories": {
|
|
18
18
|
"lib": "dist",
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"clean": "pnpm dlx rimraf dist",
|
|
44
|
-
"build": "
|
|
45
|
-
"prepublishOnly": "
|
|
44
|
+
"build": "pnpm clean && tsup src/index.ts --format cjs,esm --dts --clean --sourcemap",
|
|
45
|
+
"prepublishOnly": "pnpm build"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@node-minify/utils": "8.0.
|
|
48
|
+
"@node-minify/utils": "8.0.5-beta.0",
|
|
49
49
|
"csso": "5.0.5"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@node-minify/types": "8.0.
|
|
52
|
+
"@node-minify/types": "8.0.3-beta.0",
|
|
53
53
|
"@types/csso": "^5.0.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "22a7b887ea22743702b1dc5a613755ae20838a73"
|
|
56
56
|
}
|