@tsparticles/cli 1.13.0 → 2.0.0-beta.1
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.
|
@@ -76,16 +76,15 @@ async function buildDistFiles(basePath) {
|
|
|
76
76
|
const contents = await fs_extra_1.default.readFile(file.path, "utf8");
|
|
77
77
|
await fs_extra_1.default.writeFile(file.path, contents.replaceAll("__VERSION__", `"${pkgInfo.version}"`), "utf8");
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
await
|
|
79
|
+
for await (const file of (0, klaw_1.default)(path_1.default.join(distPath, "cjs"))) {
|
|
80
|
+
await fs_extra_1.default.rename(file.path, file.path.replace(/\.js$/, ".cjs"));
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
await fs.rename(file.path, file.path.replace(/\.js$/, ".mjs"));
|
|
82
|
+
for await (const file of (0, klaw_1.default)(path_1.default.join(distPath, "esm"))) {
|
|
83
|
+
await fs_extra_1.default.rename(file.path, file.path.replace(/\.js$/, ".mjs"));
|
|
85
84
|
}
|
|
86
|
-
|
|
87
|
-
await
|
|
88
|
-
await
|
|
85
|
+
await fs_extra_1.default.writeFile(path_1.default.join(distPath, "cjs", "package.json"), `{ "type": "commonjs" }`);
|
|
86
|
+
await fs_extra_1.default.writeFile(path_1.default.join(distPath, "esm", "package.json"), `{ "type": "module" }`);
|
|
87
|
+
await fs_extra_1.default.writeFile(path_1.default.join(distPath, "browser", "package.json"), `{ "type": "module" }`);
|
|
89
88
|
res = true;
|
|
90
89
|
}
|
|
91
90
|
catch (e) {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"prettier": "@tsparticles/prettier-config",
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@babel/core": "^7.22.9",
|
|
86
|
-
"@tsparticles/cli": "^
|
|
86
|
+
"@tsparticles/cli": "^2.0.0-beta.1",
|
|
87
87
|
"@tsparticles/eslint-config": "^1.19.0",
|
|
88
88
|
"@tsparticles/prettier-config": "^1.12.0",
|
|
89
89
|
"@tsparticles/tsconfig": "^1.14.0",
|
package/package.json
CHANGED
|
@@ -71,7 +71,7 @@ export async function buildDistFiles(basePath: string): Promise<boolean> {
|
|
|
71
71
|
await fs.writeFile(file.path, contents.replaceAll("__VERSION__", `"${pkgInfo.version}"`), "utf8");
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
for await (const file of klaw(path.join(distPath, "cjs"))) {
|
|
75
75
|
await fs.rename(file.path, file.path.replace(/\.js$/, ".cjs"));
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -80,7 +80,8 @@ export async function buildDistFiles(basePath: string): Promise<boolean> {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
await fs.writeFile(path.join(distPath, "cjs", "package.json"), `{ "type": "commonjs" }`);
|
|
83
|
-
await fs.writeFile(path.join(distPath, "esm", "package.json"), `{ "type": "module" }`)
|
|
83
|
+
await fs.writeFile(path.join(distPath, "esm", "package.json"), `{ "type": "module" }`);
|
|
84
|
+
await fs.writeFile(path.join(distPath, "browser", "package.json"), `{ "type": "module" }`);
|
|
84
85
|
|
|
85
86
|
res = true;
|
|
86
87
|
} catch (e) {
|