Skip to content

Commit 85a6d2c

Browse files
committed
build: created new function for replacing tokens in files
build: added tests
1 parent 8f570ff commit 85a6d2c

File tree

12 files changed

+1327
-675
lines changed

12 files changed

+1327
-675
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules
33
.DS_Store
44
test-cli
55
.idea
6+
.nyc_output

.mocharc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extension": [
3+
"ts"
4+
],
5+
"spec": "tests/**/*.ts",
6+
"require": [
7+
"ts-node/register",
8+
"source-map-support/register"
9+
],
10+
"recursive": true
11+
}

package.json

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"compile:ci": "pnpm run build:ts",
2121
"build:ts": "pnpm run build:ts:cjs",
2222
"build:ts:cjs": "tsc -p src",
23+
"test": "cross-env TS_NODE_PROJECT='./tests/tsconfig.json' nyc mocha",
2324
"build": "pnpm run clear:dist && pnpm run prettify:src && pnpm run lint && pnpm run compile && 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",
2425
"build:ci": "pnpm run clear:dist && pnpm run prettify:ci:src && pnpm run lint:ci && pnpm run compile && pnpm run prettify:ci:readme",
2526
"clear:dist": "rimraf ./dist",
@@ -31,28 +32,34 @@
3132
"@tsparticles/prettier-config": "^1.12.0",
3233
"@tsparticles/tsconfig": "^1.14.0",
3334
"@tsparticles/webpack-plugin": "^1.23.0",
34-
"@typescript-eslint/eslint-plugin": "^6.1.0",
35-
"@typescript-eslint/parser": "^6.1.0",
35+
"@typescript-eslint/eslint-plugin": "^6.2.1",
36+
"@typescript-eslint/parser": "^6.2.1",
3637
"commander": "^11.0.0",
37-
"eslint": "^8.45.0",
38+
"eslint": "^8.46.0",
3839
"eslint-config-prettier": "^9.0.0",
39-
"eslint-plugin-jsdoc": "^46.4.4",
40+
"eslint-plugin-jsdoc": "^46.4.6",
4041
"eslint-plugin-tsdoc": "^0.2.17",
4142
"fs-extra": "^11.1.1",
4243
"klaw": "^4.1.0",
4344
"path-scurry": "^1.10.1",
44-
"prettier": "^3.0.0",
45+
"prettier": "^3.0.1",
4546
"prompts": "^2.4.2",
4647
"rimraf": "^5.0.1",
4748
"typescript": "^5.1.6",
4849
"webpack": "^5.88.2"
4950
},
5051
"devDependencies": {
51-
"@types/eslint": "^8.44.0",
52+
"@types/chai": "^4.3.5",
5253
"@types/fs-extra": "^11.0.1",
5354
"@types/klaw": "^3.0.3",
54-
"@types/node": "^20.4.4",
55-
"@types/prompts": "^2.4.4"
55+
"@types/mocha": "^10.0.1",
56+
"@types/node": "^20.4.8",
57+
"@types/prompts": "^2.4.4",
58+
"chai": "^4.3.7",
59+
"cross-env": "^7.0.3",
60+
"mocha": "^10.2.0",
61+
"nyc": "^15.1.0",
62+
"ts-node": "^10.9.1"
5663
},
5764
"description": "tsParticles CLI",
5865
"main": ".eslintrc.js",

0 commit comments

Comments
 (0)