@tsparticles/cli 1.5.1 → 1.6.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.
|
@@ -36,7 +36,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
36
36
|
*/
|
|
37
37
|
async function buildDistFiles(basePath) {
|
|
38
38
|
console.log("Build - started on dist files");
|
|
39
|
-
let res
|
|
39
|
+
let res;
|
|
40
40
|
try {
|
|
41
41
|
const pkgInfo = await Promise.resolve(`${path_1.default.join(basePath, "package.json")}`).then(s => __importStar(require(s))), libPackage = path_1.default.join(basePath, "package.dist.json"), distPath = path_1.default.join(basePath, pkgInfo.publishConfig?.directory || "dist");
|
|
42
42
|
const data = await fs_extra_1.default.readFile(libPackage), text = data.toString(), libObj = JSON.parse(text);
|
|
@@ -76,6 +76,8 @@ 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
|
+
await fs_extra_1.default.writeFile(path_1.default.join(distPath, "cjs", "package.json"), `{ "type": "commonjs" }`);
|
|
80
|
+
await fs_extra_1.default.writeFile(path_1.default.join(distPath, "esm", "package.json"), `{ "type": "module" }`);
|
|
79
81
|
res = true;
|
|
80
82
|
}
|
|
81
83
|
catch (e) {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"prettier": "@tsparticles/prettier-config",
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@babel/core": "^7.22.1",
|
|
86
|
-
"@tsparticles/cli": "1.
|
|
86
|
+
"@tsparticles/cli": "1.6.0",
|
|
87
87
|
"@tsparticles/eslint-config": "^1.12.1",
|
|
88
88
|
"@tsparticles/prettier-config": "^1.10.0",
|
|
89
89
|
"@tsparticles/tsconfig": "^1.13.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bin": {
|
|
6
6
|
"tsparticles-cli": "dist/cli.js"
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
},
|
|
11
11
|
"prettier": "@tsparticles/prettier-config",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@tsparticles/eslint-config": "^1.
|
|
13
|
+
"@tsparticles/eslint-config": "^1.13.0",
|
|
14
14
|
"@tsparticles/prettier-config": "^1.10.0",
|
|
15
15
|
"@tsparticles/tsconfig": "^1.13.0",
|
|
16
|
-
"@tsparticles/webpack-plugin": "^1.
|
|
17
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
18
|
-
"@typescript-eslint/parser": "^5.
|
|
19
|
-
"commander": "^
|
|
20
|
-
"eslint": "^8.
|
|
16
|
+
"@tsparticles/webpack-plugin": "^1.15.0",
|
|
17
|
+
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
|
18
|
+
"@typescript-eslint/parser": "^5.60.0",
|
|
19
|
+
"commander": "^11.0.0",
|
|
20
|
+
"eslint": "^8.43.0",
|
|
21
21
|
"eslint-config-prettier": "^8.8.0",
|
|
22
|
-
"eslint-plugin-jsdoc": "^46.2.
|
|
22
|
+
"eslint-plugin-jsdoc": "^46.2.6",
|
|
23
23
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
24
24
|
"fs-extra": "^11.1.1",
|
|
25
25
|
"klaw": "^4.1.0",
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"prompts": "^2.4.2",
|
|
29
29
|
"rimraf": "^5.0.1",
|
|
30
30
|
"typescript": "^5.1.3",
|
|
31
|
-
"webpack": "^5.
|
|
31
|
+
"webpack": "^5.87.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@types/eslint": "^8.40.
|
|
34
|
+
"@types/eslint": "^8.40.2",
|
|
35
35
|
"@types/fs-extra": "^11.0.1",
|
|
36
36
|
"@types/klaw": "^3.0.3",
|
|
37
|
-
"@types/node": "^20.
|
|
37
|
+
"@types/node": "^20.3.1",
|
|
38
38
|
"@types/prettier": "^2.7.3",
|
|
39
39
|
"@types/prompts": "^2.4.4"
|
|
40
40
|
},
|
|
41
|
-
"description": "
|
|
41
|
+
"description": "tsParticles CLI",
|
|
42
42
|
"main": ".eslintrc.js",
|
|
43
|
-
"author": "",
|
|
43
|
+
"author": "Matteo Bruni <matteo.bruni@me.com>",
|
|
44
44
|
"scripts": {
|
|
45
45
|
"prettify:ci:src": "prettier --check ./src/*",
|
|
46
46
|
"prettify:ci:readme": "prettier --check ./README.md",
|
|
@@ -9,7 +9,7 @@ import path from "path";
|
|
|
9
9
|
export async function buildDistFiles(basePath: string): Promise<boolean> {
|
|
10
10
|
console.log("Build - started on dist files");
|
|
11
11
|
|
|
12
|
-
let res
|
|
12
|
+
let res: boolean;
|
|
13
13
|
|
|
14
14
|
try {
|
|
15
15
|
const pkgInfo = await import(path.join(basePath, "package.json")),
|
|
@@ -71,6 +71,9 @@ 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
|
+
await fs.writeFile(path.join(distPath, "cjs", "package.json"), `{ "type": "commonjs" }`);
|
|
75
|
+
await fs.writeFile(path.join(distPath, "esm", "package.json"), `{ "type": "module" }`);
|
|
76
|
+
|
|
74
77
|
res = true;
|
|
75
78
|
} catch (e) {
|
|
76
79
|
console.error(e);
|