@tsparticles/cli 3.0.5 → 3.0.7
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/build/build.js +1 -1
- package/dist/cli.js +5 -2
- package/eslint.config.js +2 -2
- package/files/empty-project/package.json +5 -5
- package/files/empty-project/webpack.config.js +14 -2
- package/package.json +4 -4
- package/src/build/build.ts +1 -1
- package/src/cli.ts +9 -2
- package/src/tsconfig.json +15 -3
- package/tests/tsconfig.json +3 -3
package/dist/build/build.js
CHANGED
|
@@ -5,7 +5,7 @@ buildCommand.option("-a, --all", "Do all build steps (default if no flags are sp
|
|
|
5
5
|
buildCommand.option("-b, --bundle", "Bundle the library using Webpack", false);
|
|
6
6
|
buildCommand.option("-c, --clean", "Clean the dist folder", false);
|
|
7
7
|
buildCommand.option("--ci", "Do all build steps for CI, no fixing files, only checking if they are formatted correctly", false);
|
|
8
|
-
buildCommand.option("-cd, --circular-deps", "Check for circular dependencies", false);
|
|
8
|
+
buildCommand.option("-r, --cd, --circular-deps", "Check for circular dependencies", false);
|
|
9
9
|
buildCommand.option("-d, --dist", "Build the dist files", false);
|
|
10
10
|
buildCommand.option("-l, --lint", "Lint the source files", false);
|
|
11
11
|
buildCommand.option("-p, --prettify", "Prettify the source files", false);
|
package/dist/cli.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { buildCommand } from "./build/build.js";
|
|
3
3
|
import { createCommand } from "./create/create.js";
|
|
4
|
-
import
|
|
4
|
+
import { fileURLToPath } from "url";
|
|
5
|
+
import fs from "fs-extra";
|
|
6
|
+
import path from "path";
|
|
5
7
|
import { program } from "commander";
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url), __dirname = path.dirname(__filename), rootPkgPath = path.join(__dirname, "package.json"), pkg = (await fs.readJson(rootPkgPath));
|
|
6
9
|
program.name("tsparticles-cli");
|
|
7
10
|
program.description("tsParticles CLI");
|
|
8
|
-
program.version(
|
|
11
|
+
program.version(pkg.version, "-v, --version", "output the current version");
|
|
9
12
|
program.addCommand(buildCommand);
|
|
10
13
|
program.addCommand(createCommand);
|
|
11
14
|
program.parse(process.argv);
|
package/eslint.config.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import {fileURLToPath} from "url";
|
|
3
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
4
|
-
|
|
5
3
|
import {defineConfig} from "eslint/config";
|
|
6
4
|
import tsParticlesESLintConfig from "@tsparticles/eslint-config";
|
|
7
5
|
|
|
6
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
|
|
8
8
|
export default defineConfig([
|
|
9
9
|
tsParticlesESLintConfig,
|
|
10
10
|
{
|
|
@@ -84,13 +84,12 @@
|
|
|
84
84
|
"prettier": "@tsparticles/prettier-config",
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@babel/core": "^7.28.3",
|
|
87
|
-
"@tsparticles/cli": "^3.0.
|
|
88
|
-
"@tsparticles/eslint-config": "^3.0.
|
|
87
|
+
"@tsparticles/cli": "^3.0.7",
|
|
88
|
+
"@tsparticles/eslint-config": "^3.0.5",
|
|
89
89
|
"@tsparticles/prettier-config": "^3.0.1",
|
|
90
|
-
"@tsparticles/tsconfig": "^3.0.
|
|
91
|
-
"@tsparticles/webpack-plugin": "^3.0.
|
|
90
|
+
"@tsparticles/tsconfig": "^3.0.5",
|
|
91
|
+
"@tsparticles/webpack-plugin": "^3.0.5",
|
|
92
92
|
"@types/webpack-env": "^1.18.8",
|
|
93
|
-
"@typescript-eslint": "^8.41.0",
|
|
94
93
|
"babel-loader": "^10.0.0",
|
|
95
94
|
"browserslist": "^4.25.4",
|
|
96
95
|
"copyfiles": "^2.4.1",
|
|
@@ -100,6 +99,7 @@
|
|
|
100
99
|
"rimraf": "^6.0.1",
|
|
101
100
|
"terser-webpack-plugin": "^5.3.14",
|
|
102
101
|
"typescript": "^5.9.2",
|
|
102
|
+
"typescript-eslint": "^8.41.0",
|
|
103
103
|
"webpack": "^5.101.3",
|
|
104
104
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
105
105
|
"webpack-cli": "^6.0.1"
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import {loadParticlesTemplate} from "@tsparticles/webpack-plugin";
|
|
2
|
-
import {
|
|
2
|
+
import {fileURLToPath} from "url";
|
|
3
|
+
import fs from "fs-extra";
|
|
4
|
+
import path from "path";
|
|
3
5
|
|
|
4
|
-
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url),
|
|
7
|
+
__dirname = path.dirname(__filename),
|
|
8
|
+
rootPkgPath = path.join(__dirname, "package.json"),
|
|
9
|
+
pkg = await fs.readJson(rootPkgPath);
|
|
10
|
+
|
|
11
|
+
export default loadParticlesTemplate({
|
|
12
|
+
moduleName: "empty",
|
|
13
|
+
templateName: "Empty",
|
|
14
|
+
version: pkg.version,
|
|
15
|
+
dir: __dirname
|
|
16
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
},
|
|
12
12
|
"prettier": "@tsparticles/prettier-config",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@tsparticles/eslint-config": "^3.0.
|
|
14
|
+
"@tsparticles/eslint-config": "^3.0.5",
|
|
15
15
|
"@tsparticles/prettier-config": "^3.0.1",
|
|
16
|
-
"@tsparticles/tsconfig": "^3.0.
|
|
17
|
-
"@tsparticles/webpack-plugin": "^3.0.
|
|
16
|
+
"@tsparticles/tsconfig": "^3.0.5",
|
|
17
|
+
"@tsparticles/webpack-plugin": "^3.0.5",
|
|
18
18
|
"commander": "^14.0.0",
|
|
19
19
|
"eslint": "^9.34.0",
|
|
20
20
|
"eslint-config-prettier": "^10.1.8",
|
package/src/build/build.ts
CHANGED
|
@@ -15,7 +15,7 @@ buildCommand.option(
|
|
|
15
15
|
"Do all build steps for CI, no fixing files, only checking if they are formatted correctly",
|
|
16
16
|
false,
|
|
17
17
|
);
|
|
18
|
-
buildCommand.option("-cd, --circular-deps", "Check for circular dependencies", false);
|
|
18
|
+
buildCommand.option("-r, --cd, --circular-deps", "Check for circular dependencies", false);
|
|
19
19
|
buildCommand.option("-d, --dist", "Build the dist files", false);
|
|
20
20
|
buildCommand.option("-l, --lint", "Lint the source files", false);
|
|
21
21
|
buildCommand.option("-p, --prettify", "Prettify the source files", false);
|
package/src/cli.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { buildCommand } from "./build/build.js";
|
|
3
3
|
import { createCommand } from "./create/create.js";
|
|
4
|
-
import
|
|
4
|
+
import { fileURLToPath } from "url";
|
|
5
|
+
import fs from "fs-extra";
|
|
6
|
+
import path from "path";
|
|
5
7
|
import { program } from "commander";
|
|
6
8
|
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url),
|
|
10
|
+
__dirname = path.dirname(__filename),
|
|
11
|
+
rootPkgPath = path.join(__dirname, "package.json"),
|
|
12
|
+
pkg = (await fs.readJson(rootPkgPath)) as { version: string };
|
|
13
|
+
|
|
7
14
|
program.name("tsparticles-cli");
|
|
8
15
|
program.description("tsParticles CLI");
|
|
9
|
-
program.version(
|
|
16
|
+
program.version(pkg.version, "-v, --version", "output the current version");
|
|
10
17
|
program.addCommand(buildCommand);
|
|
11
18
|
program.addCommand(createCommand);
|
|
12
19
|
program.parse(process.argv);
|
package/src/tsconfig.json
CHANGED
|
@@ -13,7 +13,19 @@
|
|
|
13
13
|
/* Language and Environment */
|
|
14
14
|
"target": "ESNext",
|
|
15
15
|
/* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
|
16
|
-
"lib": [
|
|
16
|
+
"lib": [
|
|
17
|
+
"ESNext",
|
|
18
|
+
"ES2024",
|
|
19
|
+
"ES2023",
|
|
20
|
+
"ES2022",
|
|
21
|
+
"ES2021",
|
|
22
|
+
"ES2020",
|
|
23
|
+
"ES2019",
|
|
24
|
+
"ES2018",
|
|
25
|
+
"ES2017",
|
|
26
|
+
"ES2016",
|
|
27
|
+
"ES2015"
|
|
28
|
+
],
|
|
17
29
|
/* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
18
30
|
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
19
31
|
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
|
@@ -27,11 +39,11 @@
|
|
|
27
39
|
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
28
40
|
|
|
29
41
|
/* Modules */
|
|
30
|
-
"module": "
|
|
42
|
+
"module": "NodeNext",
|
|
31
43
|
/* Specify what module code is generated. */
|
|
32
44
|
"rootDir": ".",
|
|
33
45
|
/* Specify the root folder within your source files. */
|
|
34
|
-
"moduleResolution": "
|
|
46
|
+
"moduleResolution": "NodeNext",
|
|
35
47
|
/* Specify how TypeScript looks up a file from a given module specifier. */
|
|
36
48
|
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
37
49
|
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
package/tests/tsconfig.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "ES2021",
|
|
4
|
-
"module": "
|
|
5
|
-
"lib": ["ESNext", "ES2022", "ES2021", "ES2020", "ES2019", "ES2018", "ES2017", "ES2016", "ES2015", "DOM"],
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"lib": ["ESNext", "ES2024", "ES2023", "ES2022", "ES2021", "ES2020", "ES2019", "ES2018", "ES2017", "ES2016", "ES2015", "DOM"],
|
|
6
6
|
"types": ["jsdom", "vitest", "node"],
|
|
7
7
|
"allowJs": true,
|
|
8
8
|
"rootDir": ".",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"strictNullChecks": true,
|
|
15
15
|
"alwaysStrict": true,
|
|
16
16
|
"noFallthroughCasesInSwitch": true,
|
|
17
|
-
"moduleResolution": "
|
|
17
|
+
"moduleResolution": "NodeNext",
|
|
18
18
|
"allowSyntheticDefaultImports": true,
|
|
19
19
|
"esModuleInterop": true,
|
|
20
20
|
"experimentalDecorators": true,
|