@node-minify/no-compress 7.0.0 → 8.0.0-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 +18 -0
- package/dist/index.js +42 -0
- package/dist/index.mjs +20 -0
- package/package.json +21 -6
- package/lib/no-compress.js +0 -47
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MinifierOptions } from '@node-minify/types';
|
|
2
|
+
|
|
3
|
+
/*!
|
|
4
|
+
* node-minify
|
|
5
|
+
* Copyright(c) 2011-2022 Rodolphe Stoclin
|
|
6
|
+
* MIT Licensed
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Just merge, no compression.
|
|
11
|
+
*
|
|
12
|
+
* @param {Object} settings
|
|
13
|
+
* @param {String} content
|
|
14
|
+
* @param {Function} callback
|
|
15
|
+
*/
|
|
16
|
+
declare const noCompress: ({ settings, content, callback, index }: MinifierOptions) => any;
|
|
17
|
+
|
|
18
|
+
export { noCompress as default };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/index.ts
|
|
20
|
+
var src_exports = {};
|
|
21
|
+
__export(src_exports, {
|
|
22
|
+
default: () => src_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(src_exports);
|
|
25
|
+
var import_utils = require("@node-minify/utils");
|
|
26
|
+
var noCompress = ({ settings, content, callback, index }) => {
|
|
27
|
+
if (settings && !settings.content) {
|
|
28
|
+
import_utils.utils.writeFile({ file: settings.output, content, index });
|
|
29
|
+
}
|
|
30
|
+
if (callback) {
|
|
31
|
+
return callback(null, content);
|
|
32
|
+
}
|
|
33
|
+
return content;
|
|
34
|
+
};
|
|
35
|
+
var src_default = noCompress;
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {});
|
|
38
|
+
/*!
|
|
39
|
+
* node-minify
|
|
40
|
+
* Copyright(c) 2011-2022 Rodolphe Stoclin
|
|
41
|
+
* MIT Licensed
|
|
42
|
+
*/
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { utils } from "@node-minify/utils";
|
|
3
|
+
var noCompress = ({ settings, content, callback, index }) => {
|
|
4
|
+
if (settings && !settings.content) {
|
|
5
|
+
utils.writeFile({ file: settings.output, content, index });
|
|
6
|
+
}
|
|
7
|
+
if (callback) {
|
|
8
|
+
return callback(null, content);
|
|
9
|
+
}
|
|
10
|
+
return content;
|
|
11
|
+
};
|
|
12
|
+
var src_default = noCompress;
|
|
13
|
+
export {
|
|
14
|
+
src_default as default
|
|
15
|
+
};
|
|
16
|
+
/*!
|
|
17
|
+
* node-minify
|
|
18
|
+
* Copyright(c) 2011-2022 Rodolphe Stoclin
|
|
19
|
+
* MIT Licensed
|
|
20
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-minify/no-compress",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-beta.0",
|
|
4
4
|
"description": "no compress plugin for @node-minify, only concatenate",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"concatenate"
|
|
@@ -8,16 +8,23 @@
|
|
|
8
8
|
"author": "Rodolphe Stoclin <srodolphe@gmail.com>",
|
|
9
9
|
"homepage": "https://github.com/srod/node-minify/tree/master/packages/no-compress#readme",
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"main": "lib/no-compress.js",
|
|
12
11
|
"engines": {
|
|
13
12
|
"node": ">=14.0.0"
|
|
14
13
|
},
|
|
15
14
|
"directories": {
|
|
16
|
-
"lib": "
|
|
15
|
+
"lib": "dist",
|
|
17
16
|
"test": "__tests__"
|
|
18
17
|
},
|
|
18
|
+
"main": "./dist/index.js",
|
|
19
|
+
"module": "./dist/index.mjs",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
"require": "./dist/index.js",
|
|
23
|
+
"import": "./dist/index.mjs",
|
|
24
|
+
"types": "./dist/index.d.ts"
|
|
25
|
+
},
|
|
19
26
|
"files": [
|
|
20
|
-
"
|
|
27
|
+
"dist/**/*"
|
|
21
28
|
],
|
|
22
29
|
"publishConfig": {
|
|
23
30
|
"access": "public"
|
|
@@ -29,8 +36,16 @@
|
|
|
29
36
|
"bugs": {
|
|
30
37
|
"url": "https://github.com/srod/node-minify/issues"
|
|
31
38
|
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"clean": "pnpm dlx rimraf dist",
|
|
41
|
+
"build": "npm run clean && tsup src/index.ts --format cjs,esm --dts --clean",
|
|
42
|
+
"prepublishOnly": "npm run build"
|
|
43
|
+
},
|
|
32
44
|
"dependencies": {
|
|
33
|
-
"@node-minify/utils": "
|
|
45
|
+
"@node-minify/utils": "8.0.0-beta.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@node-minify/types": "8.0.0-beta.0"
|
|
34
49
|
},
|
|
35
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "0507c6190577e1939997a8231b07952ba167a780"
|
|
36
51
|
}
|
package/lib/no-compress.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _utils = require("@node-minify/utils");
|
|
4
|
-
|
|
5
|
-
/*!
|
|
6
|
-
* node-minify
|
|
7
|
-
* Copyright(c) 2011-2022 Rodolphe Stoclin
|
|
8
|
-
* MIT Licensed
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Module dependencies.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Just merge, no compression.
|
|
17
|
-
*
|
|
18
|
-
* @param {Object} settings
|
|
19
|
-
* @param {String} content
|
|
20
|
-
* @param {Function} callback
|
|
21
|
-
*/
|
|
22
|
-
const noCompress = ({
|
|
23
|
-
settings,
|
|
24
|
-
content,
|
|
25
|
-
callback,
|
|
26
|
-
index
|
|
27
|
-
}) => {
|
|
28
|
-
if (!settings.content) {
|
|
29
|
-
_utils.utils.writeFile({
|
|
30
|
-
file: settings.output,
|
|
31
|
-
content,
|
|
32
|
-
index
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (callback) {
|
|
37
|
-
return callback(null, content);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return content;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Expose `noCompress()`.
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
module.exports = noCompress;
|