@node-minify/crass 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 +1 -1
- package/dist/index.js +7 -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
package/dist/index.js
CHANGED
|
@@ -14,6 +14,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
return to;
|
|
15
15
|
};
|
|
16
16
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
17
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
18
22
|
mod
|
|
19
23
|
));
|
|
@@ -23,8 +27,8 @@ var import_crass = __toESM(require("crass"));
|
|
|
23
27
|
var import_utils = require("@node-minify/utils");
|
|
24
28
|
var minifyCrass = ({ settings, content, callback, index }) => {
|
|
25
29
|
const contentMinified = import_crass.default.parse(content).optimize().toString();
|
|
26
|
-
if (settings && !settings.content) {
|
|
27
|
-
import_utils.utils.writeFile({ file: settings.output, content: contentMinified, index });
|
|
30
|
+
if (settings && !settings.content && settings.output) {
|
|
31
|
+
settings.output && import_utils.utils.writeFile({ file: settings.output, content: contentMinified, index });
|
|
28
32
|
}
|
|
29
33
|
if (callback) {
|
|
30
34
|
return callback(null, contentMinified);
|
|
@@ -35,7 +39,7 @@ minifyCrass.default = minifyCrass;
|
|
|
35
39
|
module.exports = minifyCrass;
|
|
36
40
|
/*!
|
|
37
41
|
* node-minify
|
|
38
|
-
* Copyright(c) 2011-
|
|
42
|
+
* Copyright(c) 2011-2023 Rodolphe Stoclin
|
|
39
43
|
* MIT Licensed
|
|
40
44
|
*/
|
|
41
45
|
//# 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 crass from 'crass';\nimport { utils } from '@node-minify/utils';\nimport { MinifierOptions } from '@node-minify/types';\n\n/**\n * Run crass.\n *\n * @param {Object} settings\n * @param {String} content\n * @param {Function} callback\n */\nconst minifyCrass = ({ settings, content, callback, index }: MinifierOptions) => {\n const contentMinified = crass.parse(content).optimize().toString();\n if (settings && !settings.content && settings.output) {\n settings.output && utils.writeFile({ file: settings.output, content: contentMinified, index });\n }\n if (callback) {\n return callback(null, contentMinified);\n }\n return contentMinified;\n};\n\n/**\n * Expose `minifyCrass()`.\n */\nminifyCrass.default = minifyCrass;\nexport = minifyCrass;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AASA,mBAAkB;AAClB,mBAAsB;AAUtB,IAAM,cAAc,CAAC,EAAE,UAAU,SAAS,UAAU,MAAM,MAAuB;AAC/E,QAAM,kBAAkB,aAAAA,QAAM,MAAM,OAAO,EAAE,SAAS,EAAE,SAAS;AACjE,MAAI,YAAY,CAAC,SAAS,WAAW,SAAS,QAAQ;AACpD,aAAS,UAAU,mBAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAS,iBAAiB,MAAM,CAAC;AAAA,EAC/F;AACA,MAAI,UAAU;AACZ,WAAO,SAAS,MAAM,eAAe;AAAA,EACvC;AACA,SAAO;AACT;AAKA,YAAY,UAAU;AACtB,iBAAS;","names":["crass"]}
|
package/dist/index.mjs
CHANGED
|
@@ -10,8 +10,8 @@ var require_src = __commonJS({
|
|
|
10
10
|
"src/index.ts"(exports, module) {
|
|
11
11
|
var minifyCrass = ({ settings, content, callback, index }) => {
|
|
12
12
|
const contentMinified = crass.parse(content).optimize().toString();
|
|
13
|
-
if (settings && !settings.content) {
|
|
14
|
-
utils.writeFile({ file: settings.output, content: contentMinified, index });
|
|
13
|
+
if (settings && !settings.content && settings.output) {
|
|
14
|
+
settings.output && utils.writeFile({ file: settings.output, content: contentMinified, index });
|
|
15
15
|
}
|
|
16
16
|
if (callback) {
|
|
17
17
|
return callback(null, contentMinified);
|
|
@@ -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 crass from 'crass';\nimport { utils } from '@node-minify/utils';\nimport { MinifierOptions } from '@node-minify/types';\n\n/**\n * Run crass.\n *\n * @param {Object} settings\n * @param {String} content\n * @param {Function} callback\n */\nconst minifyCrass = ({ settings, content, callback, index }: MinifierOptions) => {\n const contentMinified = crass.parse(content).optimize().toString();\n if (settings && !settings.content && settings.output) {\n settings.output && utils.writeFile({ file: settings.output, content: contentMinified, index });\n }\n if (callback) {\n return callback(null, contentMinified);\n }\n return contentMinified;\n};\n\n/**\n * Expose `minifyCrass()`.\n */\nminifyCrass.default = minifyCrass;\nexport = minifyCrass;\n"],"mappings":";;;;;;AASA,OAAO,WAAW;AAClB,SAAS,aAAa;AAVtB;AAAA;AAoBA,QAAM,cAAc,CAAC,EAAE,UAAU,SAAS,UAAU,MAAM,MAAuB;AAC/E,YAAM,kBAAkB,MAAM,MAAM,OAAO,EAAE,SAAS,EAAE,SAAS;AACjE,UAAI,YAAY,CAAC,SAAS,WAAW,SAAS,QAAQ;AACpD,iBAAS,UAAU,MAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAS,iBAAiB,MAAM,CAAC;AAAA,MAC/F;AACA,UAAI,UAAU;AACZ,eAAO,SAAS,MAAM,eAAe;AAAA,MACvC;AACA,aAAO;AAAA,IACT;AAKA,gBAAY,UAAU;AACtB,qBAAS;AAAA;AAAA;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-minify/crass",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.5-beta.0",
|
|
4
4
|
"description": "crass 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/crass#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,15 +41,15 @@
|
|
|
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
|
"crass": "0.12.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@node-minify/types": "8.0.
|
|
52
|
+
"@node-minify/types": "8.0.3-beta.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "22a7b887ea22743702b1dc5a613755ae20838a73"
|
|
55
55
|
}
|