@tsparticles/cli 2.2.4 → 2.3.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.
@@ -5,7 +5,7 @@ import type { Engine } from "@tsparticles/engine";
5
5
  * @param engine - the engine instance to load the preset into
6
6
  */
7
7
  export async function loadTemplatePreset(engine: Engine): Promise<void> {
8
- const { options } = await import("./options");
8
+ const { options } = await import("./options.js");
9
9
 
10
10
  // TODO: additional modules must be loaded here
11
11
 
@@ -1,7 +1,7 @@
1
1
  import type { IShapeDrawData, IShapeDrawer } from "@tsparticles/engine";
2
2
 
3
3
  export class ShapeDrawer implements IShapeDrawer {
4
- async draw(_data: IShapeDrawData): Promise<void> {
4
+ draw(_data: IShapeDrawData): void {
5
5
  // draw the particle using the context
6
6
  // which is already centered in the particle position
7
7
  // colors are already handled, just draw the shape
@@ -10,8 +10,5 @@ export class ShapeDrawer implements IShapeDrawer {
10
10
  // pixelRatio is the canvas ratio used by the tsParticles instance, you may need it for density-independent shapes
11
11
  // the parameters have an underscore prefix because they're not used in this example
12
12
  // the underscore prefix can be removed for used parameters, the unused ones can be removed too
13
-
14
- // remove this if there's already an await call
15
- await Promise.resolve();
16
13
  }
17
14
  }
@@ -4,7 +4,7 @@ import type { Engine } from "@tsparticles/engine";
4
4
  * @param engine - the engine instance to load the shape into
5
5
  */
6
6
  export async function loadTemplateShape(engine: Engine): Promise<void> {
7
- const { ShapeDrawer } = await import("./ShapeDrawer");
7
+ const { ShapeDrawer } = await import("./ShapeDrawer.js");
8
8
 
9
9
  await engine.addShape("#template#", new ShapeDrawer());
10
10
  }
@@ -72,6 +72,6 @@
72
72
  "module": "index.js",
73
73
  "types": "index.d.ts",
74
74
  "dependencies": {
75
- "@tsparticles/engine": "^3.0.3"
75
+ "@tsparticles/engine": "^3.3.0"
76
76
  }
77
77
  }
@@ -83,16 +83,16 @@
83
83
  "prettier": "@tsparticles/prettier-config",
84
84
  "devDependencies": {
85
85
  "@babel/core": "^7.23.9",
86
- "@tsparticles/cli": "^2.2.4",
87
- "@tsparticles/eslint-config": "^2.1.4",
88
- "@tsparticles/prettier-config": "^2.1.0",
89
- "@tsparticles/tsconfig": "^2.0.1",
90
- "@tsparticles/webpack-plugin": "^2.1.4",
86
+ "@tsparticles/cli": "^2.3.1",
87
+ "@tsparticles/eslint-config": "^2.2.1",
88
+ "@tsparticles/prettier-config": "^2.1.6",
89
+ "@tsparticles/tsconfig": "^2.1.7",
90
+ "@tsparticles/webpack-plugin": "^2.2.1",
91
91
  "@types/webpack-env": "^1.18.4",
92
- "@typescript-eslint/eslint-plugin": "^6.20.0",
93
- "@typescript-eslint/parser": "^6.20.0",
92
+ "@typescript-eslint/eslint-plugin": "^7.1.0",
93
+ "@typescript-eslint/parser": "^7.1.0",
94
94
  "babel-loader": "^9.1.3",
95
- "browserslist": "^4.22.3",
95
+ "browserslist": "^4.23.0",
96
96
  "copyfiles": "^2.4.1",
97
97
  "eslint": "^8.56.0",
98
98
  "eslint-config-prettier": "^9.1.0",
@@ -105,6 +105,6 @@
105
105
  "webpack-cli": "^5.1.4"
106
106
  },
107
107
  "dependencies": {
108
- "@tsparticles/engine": "^3.2.0"
108
+ "@tsparticles/engine": "^3.3.0"
109
109
  }
110
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/cli",
3
- "version": "2.2.4",
3
+ "version": "2.3.1",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "tsparticles-cli": "dist/cli.js"
@@ -10,10 +10,10 @@
10
10
  },
11
11
  "prettier": "@tsparticles/prettier-config",
12
12
  "dependencies": {
13
- "@tsparticles/eslint-config": "^2.1.4",
14
- "@tsparticles/prettier-config": "^2.1.0",
13
+ "@tsparticles/eslint-config": "^2.2.1",
14
+ "@tsparticles/prettier-config": "^2.1.6",
15
15
  "@tsparticles/tsconfig": "^2.1.7",
16
- "@tsparticles/webpack-plugin": "^2.1.6",
16
+ "@tsparticles/webpack-plugin": "^2.2.1",
17
17
  "@typescript-eslint/eslint-plugin": "^7.1.0",
18
18
  "@typescript-eslint/parser": "^7.1.0",
19
19
  "commander": "^12.0.0",
@@ -34,18 +34,31 @@
34
34
  "webpack": "^5.90.3"
35
35
  },
36
36
  "devDependencies": {
37
+ "@babel/core": "^7.23.9",
38
+ "@tsparticles/cli": "^2.2.4",
39
+ "@tsparticles/engine": "^3.3.0",
37
40
  "@types/chai": "^4.3.12",
41
+ "@types/eslint": "^8.56.5",
38
42
  "@types/fs-extra": "^11.0.4",
39
43
  "@types/klaw": "^3.0.6",
40
44
  "@types/madge": "^5.0.3",
41
45
  "@types/mocha": "^10.0.6",
42
- "@types/node": "^20.11.20",
46
+ "@types/node": "^20.11.24",
43
47
  "@types/prompts": "^2.4.9",
48
+ "@types/webpack-env": "^1.18.4",
49
+ "@typescript-eslint/eslint-plugin": "^7.1.0",
50
+ "@typescript-eslint/parser": "^7.1.0",
51
+ "babel-loader": "^9.1.3",
52
+ "browserslist": "^4.23.0",
44
53
  "chai": "^4.4.1",
54
+ "copyfiles": "^2.4.1",
45
55
  "cross-env": "^7.0.3",
46
56
  "mocha": "^10.3.0",
47
57
  "nyc": "^15.1.0",
48
- "ts-node": "^10.9.2"
58
+ "terser-webpack-plugin": "^5.3.10",
59
+ "ts-node": "^10.9.2",
60
+ "webpack-bundle-analyzer": "^4.10.1",
61
+ "webpack-cli": "^5.1.4"
49
62
  },
50
63
  "description": "tsParticles CLI",
51
64
  "main": ".eslintrc.js",
@@ -64,7 +77,7 @@
64
77
  "build:ts:cjs": "tsc -p src",
65
78
  "test": "cross-env TS_NODE_PROJECT='./tests/tsconfig.json' nyc mocha --timeout 300000",
66
79
  "build": "pnpm run clear:dist && pnpm run prettify:src && pnpm run lint && pnpm run compile && pnpm run circular-deps && pnpm run prettify:readme && chmod +x dist/cli.js && chmod +x dist/build/build.js && chmod +x dist/create/create.js && chmod +x dist/create/preset/preset.js",
67
- "build:ci": "pnpm run clear:dist && pnpm run prettify:ci:src && pnpm run lint:ci && pnpm run compile && pnpm run prettify:ci:readme",
80
+ "build:ci": "pnpm run clear:dist && pnpm run prettify:ci:src && pnpm run lint:ci && pnpm run compile:ci && pnpm run prettify:ci:readme",
68
81
  "clear:dist": "rimraf ./dist",
69
82
  "version": "node scripts/postversion.js && git add files/empty-project/package.json"
70
83
  }
package/tsconfig.json CHANGED
@@ -1,9 +1,21 @@
1
1
  {
2
- "compilerOptions": {
3
- "rootDir": ".",
4
- "outDir": ".",
5
- "resolveJsonModule": true,
6
- "composite": true
7
- },
8
- "files": ["package.json"]
2
+ "compilerOptions": {
3
+ "rootDir": ".",
4
+ "outDir": ".",
5
+ "resolveJsonModule": true,
6
+ "composite": true,
7
+ "types": [
8
+ "node",
9
+ "chai",
10
+ "mocha",
11
+ "fs-extra",
12
+ "klaw",
13
+ "madge",
14
+ "prompts",
15
+ "eslint"
16
+ ]
17
+ },
18
+ "files": [
19
+ "package.json"
20
+ ]
9
21
  }