Skip to content

Commit fe86dd7

Browse files
committed
fix(examples): use cross-platform tools in playground scripts
Replace Unix-specific commands with cross-platform alternatives: - Use `rimraf` instead of `rm -rf` for file deletion - Use `cross-env` instead of `env` for environment variables This ensures playground examples work correctly on Windows, macOS, and Linux. Signed-off-by: Alejandro Mery <[email protected]>
1 parent 8f0db65 commit fe86dd7

File tree

4 files changed

+37
-13
lines changed

4 files changed

+37
-13
lines changed

examples/playground-nuxt-module/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
"dist"
1717
],
1818
"scripts": {
19-
"clean": "rm -rf node_modules dist .nuxt playground/.nuxt playground/.output",
19+
"clean": "rimraf node_modules dist .nuxt playground/.nuxt playground/.output",
2020
"dev": "nuxi dev playground",
2121
"dev:build": "nuxi build playground",
2222
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
23-
"lint": "env DEBUG=eslint:eslint eslint .",
24-
"lint:fix": "env DEBUG=eslint:eslint eslint --fix .",
23+
"lint": "cross-env DEBUG=eslint:eslint eslint .",
24+
"lint:fix": "cross-env DEBUG=eslint:eslint eslint --fix .",
2525
"prepack": "nuxt-module-build build"
2626
},
2727
"dependencies": {
@@ -34,6 +34,8 @@
3434
"@nuxt/module-builder": "latest",
3535
"@nuxt/test-utils": "latest",
3636
"@poupe/eslint-config": "workspace:*",
37-
"nuxt": "latest"
37+
"cross-env": "^7.0.3",
38+
"nuxt": "latest",
39+
"rimraf": "^6.0.1"
3840
}
3941
}

examples/playground-nuxt/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"type": "module",
55
"scripts": {
66
"build": "nuxt build",
7-
"clean": "rm -rf node_modules .nuxt .output",
7+
"clean": "rimraf node_modules .nuxt .output",
88
"dev": "nuxt dev",
99
"generate": "nuxt generate",
10-
"lint": "env DEBUG=eslint:eslint eslint .",
11-
"lint:fix": "env DEBUG=eslint:eslint eslint --fix .",
10+
"lint": "cross-env DEBUG=eslint:eslint eslint .",
11+
"lint:fix": "cross-env DEBUG=eslint:eslint eslint --fix .",
1212
"postinstall": "nuxt prepare",
1313
"preview": "nuxt preview"
1414
},
@@ -19,6 +19,8 @@
1919
},
2020
"devDependencies": {
2121
"@nuxt/eslint": "^1.4.1",
22-
"@poupe/eslint-config": "workspace:*"
22+
"@poupe/eslint-config": "workspace:*",
23+
"cross-env": "^7.0.3",
24+
"rimraf": "^6.0.1"
2325
}
2426
}

examples/playground-standard/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"clean": "rm -rf node_modules",
8-
"lint": "env DEBUG=eslint:eslint eslint .",
9-
"lint:fix": "env DEBUG=eslint:eslint eslint --fix ."
7+
"clean": "rimraf node_modules",
8+
"lint": "cross-env DEBUG=eslint:eslint eslint .",
9+
"lint:fix": "cross-env DEBUG=eslint:eslint eslint --fix ."
1010
},
1111
"devDependencies": {
1212
"@poupe/eslint-config": "workspace:*",
13-
"eslint": "^9.27.0"
13+
"cross-env": "^7.0.3",
14+
"eslint": "^9.30.1",
15+
"rimraf": "^6.0.1"
1416
}
1517
}

pnpm-lock.yaml

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)