@suseejs/plugin-terser 1.0.0 → 1.0.2
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.cjs +4 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -13,12 +13,10 @@ function suseeTerser(terserMinifyOptions) {
|
|
|
13
13
|
return {
|
|
14
14
|
type: "post-process",
|
|
15
15
|
async: true,
|
|
16
|
-
func: async function (code,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
code = _code;
|
|
21
|
-
}
|
|
16
|
+
func: async function (code, _file) {
|
|
17
|
+
const _code = (await terser.minify(code, terserMinifyOptions)).code;
|
|
18
|
+
if (_code) {
|
|
19
|
+
code = _code;
|
|
22
20
|
}
|
|
23
21
|
return code;
|
|
24
22
|
},
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":";AACA,iCAAkC;AAElC;;;;;;;;GAQG;AACH,SAAS,WAAW,CAClB,mBAAsD;IAEtD,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,KAAK,WAAW,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":";AACA,iCAAkC;AAElC;;;;;;;;GAQG;AACH,SAAS,WAAW,CAClB,mBAAsD;IAEtD,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,KAAK,WAAW,IAAI,EAAE,KAAK;YAC/B,MAAM,KAAK,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC;YACpE,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,GAAG,KAAK,CAAC;YACf,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC;AAED,iBAAS,WAAW,CAAC"}
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":"AAAA,YAAY,UAAU,GAAG,QAAQ,gBAAgB,CAAC,CAAC;AACnD,OAAO,MAAM,GAAG,QAAQ,QAAQ,CAAC,CAAC;AAElC;;;;;;;;GAQG;AACH,iBAAS,WAAW,CAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC,aAAa,GAAG,SAAS,GACrD,UAAU,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":"AAAA,YAAY,UAAU,GAAG,QAAQ,gBAAgB,CAAC,CAAC;AACnD,OAAO,MAAM,GAAG,QAAQ,QAAQ,CAAC,CAAC;AAElC;;;;;;;;GAQG;AACH,iBAAS,WAAW,CAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC,aAAa,GAAG,SAAS,GACrD,UAAU,CAAC,WAAW,CAYxB;AAED,SAAS,WAAW,CAAC"}
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC;;;;;;;;GAQG;AACH,iBAAS,WAAW,CAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC,aAAa,GAAG,SAAS,GACrD,UAAU,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC;;;;;;;;GAQG;AACH,iBAAS,WAAW,CAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC,aAAa,GAAG,SAAS,GACrD,UAAU,CAAC,WAAW,CAYxB;AAED,eAAe,WAAW,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -12,12 +12,10 @@ function suseeTerser(terserMinifyOptions) {
|
|
|
12
12
|
return {
|
|
13
13
|
type: "post-process",
|
|
14
14
|
async: true,
|
|
15
|
-
func: async function (code,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
code = _code;
|
|
20
|
-
}
|
|
15
|
+
func: async function (code, _file) {
|
|
16
|
+
const _code = (await terser.minify(code, terserMinifyOptions)).code;
|
|
17
|
+
if (_code) {
|
|
18
|
+
code = _code;
|
|
21
19
|
}
|
|
22
20
|
return code;
|
|
23
21
|
},
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC;;;;;;;;GAQG;AACH,SAAS,WAAW,CAClB,mBAAsD;IAEtD,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,KAAK,WAAW,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC;;;;;;;;GAQG;AACH,SAAS,WAAW,CAClB,mBAAsD;IAEtD,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,KAAK,WAAW,IAAI,EAAE,KAAK;YAC/B,MAAM,KAAK,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC;YACpE,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,GAAG,KAAK,CAAC;YACf,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suseejs/plugin-terser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Susee plugin terser",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://github.com/suseejs/plugin-terser#readme",
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@suseejs/types": "^0.1.
|
|
40
|
+
"@suseejs/types": "^0.1.9",
|
|
41
41
|
"typescript": "^5.9.3"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|