@lopatnov/rollup-plugin-uglify 2.1.1 → 2.1.4
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/README.md +22 -13
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.es.js +4 -4
- package/dist/plugin.js +8 -8
- package/package.json +70 -63
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @lopatnov/rollup-plugin-uglify [![Twitter]
|
|
1
|
+
# @lopatnov/rollup-plugin-uglify [![Twitter][twitterbage]][tweet] [![LinkedIn][linkedinbage]][linkedin]
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@lopatnov/rollup-plugin-uglify)
|
|
4
4
|
[](https://www.npmjs.com/package/@lopatnov/rollup-plugin-uglify)
|
|
@@ -6,13 +6,8 @@
|
|
|
6
6
|
[](https://github.com/lopatnov/rollup-plugin-uglify/issues)
|
|
7
7
|
[](https://github.com/lopatnov/rollup-plugin-uglify/network)
|
|
8
8
|
[](https://github.com/lopatnov/rollup-plugin-uglify/stargazers)
|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
[](https://www.patreon.com/lopatnov)
|
|
12
|
-
[](https://sobe.ru/na/tech_knigi)
|
|
13
|
-
[](https://www.linkedin.com/in/lopatnov/)
|
|
14
|
-
|
|
15
9
|
[](https://www.npmjs.com/package/@lopatnov/rollup-plugin-uglify?activeTab=dependencies)
|
|
10
|
+

|
|
16
11
|
|
|
17
12
|
A rollup plugin to minify javascript
|
|
18
13
|
|
|
@@ -56,8 +51,8 @@ export default {
|
|
|
56
51
|
//...
|
|
57
52
|
plugins: [
|
|
58
53
|
//...
|
|
59
|
-
uglify()
|
|
60
|
-
]
|
|
54
|
+
uglify(),
|
|
55
|
+
],
|
|
61
56
|
};
|
|
62
57
|
```
|
|
63
58
|
|
|
@@ -70,8 +65,8 @@ export default {
|
|
|
70
65
|
//...
|
|
71
66
|
uglify({
|
|
72
67
|
//options: IUglifyOptions
|
|
73
|
-
})
|
|
74
|
-
]
|
|
68
|
+
}),
|
|
69
|
+
],
|
|
75
70
|
};
|
|
76
71
|
```
|
|
77
72
|
|
|
@@ -88,11 +83,25 @@ export default {
|
|
|
88
83
|
|
|
89
84
|
A valid minimatch pattern, or array of patterns to include / exclude files. If `include` is omitted or has zero length, filter will return true by default. Otherwise, an ID must match one or more of the minimatch patterns, and must not match any of the `exclude` patterns.
|
|
90
85
|
|
|
91
|
-
##
|
|
86
|
+
## Donate
|
|
87
|
+
|
|
88
|
+
[![Charity Health][charity_health]][dobro]
|
|
89
|
+
|
|
90
|
+
Open source software is just a hobby. I am making it just for fun. A small amount of help will be more significant for charitable foundations. I propose to pay attention to the various local funds or to the volunteers in my country. I hope this will make someone's life better.
|
|
91
|
+
|
|
92
|
+
## Rights and Agreements [![LinkedIn][linkedinbage]][linkedin]
|
|
93
|
+
|
|
94
|
+
Contact me in LinkedIn, I will consider profitable business offers. I am Computer Software Engineer, individual entrepreneur. I develop software of various complexity for the web, desktop, mobile and embedded devices. I have expertise in web development using .NET, Angular and React frameworks, Microsoft and Google technologies, working with the North American and European markets through reseller companies by B2B business model. I was a part of development teams and worked independently with enterprise projects, digital technologies, fintech projects, real estate, barcode software and petroleum industry. I would like to note that I have not bad analytical skills. I'm improving my skills continuously and I have recommendations.
|
|
92
95
|
|
|
93
96
|
License [Apache-2.0][license]
|
|
94
97
|
|
|
95
|
-
Copyright 2019-
|
|
98
|
+
Copyright 2019-2022 Oleksandr Lopatnov
|
|
96
99
|
|
|
97
100
|
[minify-options]: https://terser.org/docs/api-reference#minify-options-structure
|
|
98
101
|
[license]: https://github.com/lopatnov/rollup-plugin-uglify/blob/master/LICENSE
|
|
102
|
+
[twitterbage]: https://img.shields.io/twitter/url?url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40lopatnov%2Frollup-plugin-uglify
|
|
103
|
+
[tweet]: https://twitter.com/intent/tweet?text=I%20want%20to%20share%20TypeScript%20library:&url=https://www.npmjs.com/package/@lopatnov/rollup-plugin-uglify
|
|
104
|
+
[linkedinbage]: https://img.shields.io/badge/LinkedIn-lopatnov-informational?style=social&logo=linkedin
|
|
105
|
+
[linkedin]: https://www.linkedin.com/in/lopatnov/
|
|
106
|
+
[dobro]: https://dobro.ua/en/projects/category/zdorovia?page=1&category=zdorovia&tag=28
|
|
107
|
+
[charity_health]: https://img.shields.io/badge/Charity%20Health-Dobro-red?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABBVBMVEUAAAAAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWQAuWT///+PPo6DAAAAVXRSTlMAAA4wOR0CAUe/7vPbfA9K5PyKBAPF9PL47f7qN2QiW0V+mpvejJWBnaBanDWLpUva3aGemaa7o1d7rY2nXt/G/eszLmoUZ4mAT+ePBU3D3IIREDEe6n6MQgAAAAFiS0dEVgoN6YkAAAAHdElNRQfkCAcPCB1MJSGgAAAAlElEQVQY02NgIB0wMjIxs7CyMcIF2Dk4ubh5ePngIvwCoUAgKCTMyMjOyCbCziAqJi4hKSUlLSMrJ6+gqKTMoKKqqqauoaGppa2jq6epb8BgqGFkbGJqZm6hZmllbWNrx2AfKuXgIBXq6OSs6uLq5u7B4OkFMtTB24cRCEC2sPn6cXH7BwQyIhwWFMwSIsJIkm9QAQBayRNRV4rFmQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOC0wN1QxNTowODoyOSswMjowMBaHG7YAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDgtMDdUMTU6MDg6MjkrMDI6MDBn2qMKAAAAV3pUWHRSYXcgcHJvZmlsZSB0eXBlIGlwdGMAAHic4/IMCHFWKCjKT8vMSeVSAAMjCy5jCxMjE0uTFAMTIESANMNkAyOzVCDL2NTIxMzEHMQHy4BIoEouAOoXEXTyQjWVAAAAAElFTkSuQmCC
|
package/dist/plugin.d.ts
CHANGED
package/dist/plugin.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { minify } from 'terser';
|
|
2
|
-
import { createFilter } from 'rollup
|
|
2
|
+
import { createFilter } from '@rollup/pluginutils';
|
|
3
3
|
|
|
4
4
|
function uglify(options) {
|
|
5
5
|
if (options === void 0) { options = {}; }
|
|
@@ -29,15 +29,15 @@ function uglify(options) {
|
|
|
29
29
|
}
|
|
30
30
|
return {
|
|
31
31
|
code: result.code,
|
|
32
|
-
map: result.map
|
|
32
|
+
map: result.map,
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
36
|
return result;
|
|
37
37
|
}
|
|
38
|
-
}
|
|
38
|
+
},
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
export default
|
|
42
|
+
export { uglify as default };
|
|
43
43
|
//# sourceMappingURL=plugin.es.js.map
|
package/dist/plugin.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('terser'), require('rollup
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['terser', 'rollup
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.uglify = factory(global.terser, global.
|
|
5
|
-
}(this, (function (terser,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('terser'), require('@rollup/pluginutils')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['terser', '@rollup/pluginutils'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.uglify = factory(global.terser, global.pluginutils));
|
|
5
|
+
})(this, (function (terser, pluginutils) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function uglify(options) {
|
|
8
8
|
if (options === void 0) { options = {}; }
|
|
9
|
-
var filter =
|
|
9
|
+
var filter = pluginutils.createFilter(options.include, options.exclude);
|
|
10
10
|
return {
|
|
11
11
|
name: "uglify",
|
|
12
12
|
transform: function (code, id) {
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
}
|
|
33
33
|
return {
|
|
34
34
|
code: result.code,
|
|
35
|
-
map: result.map
|
|
35
|
+
map: result.map,
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
39
|
return result;
|
|
40
40
|
}
|
|
41
|
-
}
|
|
41
|
+
},
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
return uglify;
|
|
46
46
|
|
|
47
|
-
}))
|
|
47
|
+
}));
|
|
48
48
|
//# sourceMappingURL=plugin.js.map
|
package/package.json
CHANGED
|
@@ -1,64 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
2
|
+
"name": "@lopatnov/rollup-plugin-uglify",
|
|
3
|
+
"version": "2.1.4",
|
|
4
|
+
"description": "Rollup plugin. Javascript code minifier",
|
|
5
|
+
"author": "lopatnov",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"homepage": "https://lopatnov.github.io/rollup-plugin-uglify/",
|
|
8
|
+
"umdName": "uglify",
|
|
9
|
+
"source": "src/plugin.ts",
|
|
10
|
+
"main": "dist/plugin.js",
|
|
11
|
+
"main_min": "dist/plugin.min.js",
|
|
12
|
+
"module": "dist/plugin.es.js",
|
|
13
|
+
"types": "dist/plugin.d.ts",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"rollup",
|
|
16
|
+
"plugin",
|
|
17
|
+
"rollup-plugin",
|
|
18
|
+
"minification",
|
|
19
|
+
"compression",
|
|
20
|
+
"typescript"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/lopatnov/rollup-plugin-uglify.git"
|
|
25
|
+
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/lopatnov/rollup-plugin-uglify/issues"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "rollup -c",
|
|
31
|
+
"watch": "rollup -cw",
|
|
32
|
+
"test": "jest",
|
|
33
|
+
"prepare": "npm i --no-save --no-package-lock terser@latest",
|
|
34
|
+
"configure-npm": "node ./set-registry.js -s https://registry.npmjs.org",
|
|
35
|
+
"configure-gpr": "node ./set-registry.js -s https://npm.pkg.github.com",
|
|
36
|
+
"update": "npx npm-check-updates -u && npm install"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist"
|
|
40
|
+
],
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"core-js": "^3.24.1"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@rollup/pluginutils": "^4.2.1",
|
|
46
|
+
"@types/jest": "^28.1.7",
|
|
47
|
+
"@types/rollup": "^0.54.0",
|
|
48
|
+
"@types/rollup-plugin-commonjs": "^9.3.1",
|
|
49
|
+
"@types/rollup-plugin-json": "^3.0.3",
|
|
50
|
+
"@types/rollup-plugin-node-resolve": "^4.1.0",
|
|
51
|
+
"@types/rollup-plugin-sourcemaps": "^0.5.0",
|
|
52
|
+
"@types/typescript": "^2.0.0",
|
|
53
|
+
"jest": "^28.1.3",
|
|
54
|
+
"jest-config": "^28.1.3",
|
|
55
|
+
"rollup": "^2.78.1",
|
|
56
|
+
"rollup-plugin-commonjs": "^10.1.0",
|
|
57
|
+
"rollup-plugin-json": "^4.0.0",
|
|
58
|
+
"rollup-plugin-node-resolve": "^5.2.0",
|
|
59
|
+
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
60
|
+
"rollup-plugin-typescript2": "^0.32.1",
|
|
61
|
+
"ts-jest": "^28.0.8",
|
|
62
|
+
"typescript": "^4.7.4"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"rollup": ">=1.0.0",
|
|
66
|
+
"terser": ">=4.0.0"
|
|
67
|
+
},
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"registry": "https://registry.npmjs.org"
|
|
70
|
+
}
|
|
71
|
+
}
|