@divriots/jampack 0.27.1 → 0.28.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 +0 -0
- package/README.md +0 -0
- package/dist/compress.js +10 -3
- package/dist/config-default.js +1 -0
- package/dist/config-types.d.ts +1 -0
- package/dist/index.js +0 -0
- package/package.json +9 -10
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
package/dist/compress.js
CHANGED
|
@@ -74,13 +74,20 @@ export async function compressFolder(state, exclude) {
|
|
|
74
74
|
if (exclude)
|
|
75
75
|
globs.push('!' + exclude);
|
|
76
76
|
const paths = await globby(globs, { cwd: state.dir, absolute: true });
|
|
77
|
-
|
|
78
|
-
await Promise.all(paths.map(async (file) => {
|
|
77
|
+
async function compressFile(file) {
|
|
79
78
|
if (!state.compressedFiles.has(file)) {
|
|
80
79
|
await processFile(state, file, await fs.stat(file));
|
|
81
80
|
spinner.text = getProgressText(state);
|
|
82
81
|
}
|
|
83
|
-
}
|
|
82
|
+
}
|
|
83
|
+
if (!state.options.misc.sequential_compress) {
|
|
84
|
+
// "Parallel" processing
|
|
85
|
+
await Promise.all(paths.map(compressFile));
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
for (const file of paths)
|
|
89
|
+
await compressFile(file);
|
|
90
|
+
}
|
|
84
91
|
spinner.text = getProgressText(state);
|
|
85
92
|
spinner.succeed();
|
|
86
93
|
}
|
package/dist/config-default.js
CHANGED
package/dist/config-types.d.ts
CHANGED
package/dist/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@divriots/jampack",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"cache-version": {
|
|
5
5
|
"img": "v1",
|
|
6
6
|
"img-ext": "v1"
|
|
@@ -59,18 +59,17 @@
|
|
|
59
59
|
"tslib": "^2.6.2",
|
|
60
60
|
"typescript": "^5.4.5"
|
|
61
61
|
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=14.0.0"
|
|
64
|
+
},
|
|
65
|
+
"bugs": "https://github.com/divriots/jampack/issues",
|
|
66
|
+
"keywords": [],
|
|
67
|
+
"types": "dist/index.d.ts",
|
|
62
68
|
"scripts": {
|
|
63
69
|
"watch": "pnpm build --watch",
|
|
64
70
|
"try": "shx rm -fr demo && cp -R demo_drc demo && node ./dist/index.js ./demo --nocache",
|
|
65
71
|
"build": "shx rm -rf dist && tsc -b",
|
|
66
72
|
"lint": "eslint . --ext .ts --config .eslintrc",
|
|
67
|
-
"prepublishOnly": "pnpm build",
|
|
68
73
|
"cleanAllDotJampack": "find -s . | grep '.jampack$' | xargs rm -fr"
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
"node": ">=14.0.0"
|
|
72
|
-
},
|
|
73
|
-
"bugs": "https://github.com/divriots/jampack/issues",
|
|
74
|
-
"keywords": [],
|
|
75
|
-
"types": "dist/index.d.ts"
|
|
76
|
-
}
|
|
74
|
+
}
|
|
75
|
+
}
|