fix(scripts): make npm scripts cross-platform with shx (closes #1771)

This commit is contained in:
Mario Zechner 2026-03-03 14:25:49 +01:00
parent 993d916e56
commit 76a191c264
9 changed files with 15 additions and 13 deletions

View file

@ -10,7 +10,7 @@
"README.md"
],
"scripts": {
"clean": "rm -rf dist",
"clean": "shx rm -rf dist",
"build": "tsgo -p tsconfig.build.json",
"dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
"test": "vitest --run",

View file

@ -13,7 +13,7 @@
"README.md"
],
"scripts": {
"clean": "rm -rf dist",
"clean": "shx rm -rf dist",
"generate-models": "npx tsx scripts/generate-models.ts",
"build": "npm run generate-models && tsgo -p tsconfig.build.json",
"dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",

View file

@ -13,8 +13,8 @@
"CHANGELOG.md"
],
"scripts": {
"clean": "rm -rf dist",
"build": "tsgo -p tsconfig.build.json && chmod +x dist/main.js",
"clean": "shx rm -rf dist",
"build": "tsgo -p tsconfig.build.json && shx chmod +x dist/main.js",
"dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
"prepublishOnly": "npm run clean && npm run build"
},

View file

@ -7,8 +7,8 @@
"pi-pods": "dist/cli.js"
},
"scripts": {
"clean": "rm -rf dist",
"build": "tsgo -p tsconfig.build.json && chmod +x dist/cli.js && cp src/models.json dist/ && cp -r scripts dist/",
"clean": "shx rm -rf dist",
"build": "tsgo -p tsconfig.build.json && shx chmod +x dist/cli.js && shx cp src/models.json dist/ && shx cp -r scripts dist/",
"prepublishOnly": "npm run clean && npm run build"
},
"files": [

View file

@ -5,7 +5,7 @@
"type": "module",
"main": "dist/index.js",
"scripts": {
"clean": "rm -rf dist",
"clean": "shx rm -rf dist",
"build": "tsgo -p tsconfig.build.json",
"dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
"test": "node --test --import tsx test/*.test.ts",

View file

@ -8,7 +8,7 @@
"build": "vite build",
"preview": "vite preview",
"check": "tsgo --noEmit",
"clean": "rm -rf dist"
"clean": "shx rm -rf dist"
},
"dependencies": {
"@mariozechner/mini-lit": "^0.2.0",

View file

@ -10,7 +10,7 @@
"./app.css": "./dist/app.css"
},
"scripts": {
"clean": "rm -rf dist",
"clean": "shx rm -rf dist",
"build": "tsgo -p tsconfig.build.json && tailwindcss -i ./src/app.css -o ./dist/app.css --minify",
"dev": "concurrently --names \"build,example\" --prefix-colors \"cyan,green\" \"tsc -p tsconfig.build.json --watch --preserveWatchOutput\" \"tailwindcss -i ./src/app.css -o ./dist/app.css --watch\" \"npm run dev --prefix example\"",
"dev:tsc": "concurrently --names \"build\" --prefix-colors \"cyan\" \"tsc -p tsconfig.build.json --watch --preserveWatchOutput\" \"tailwindcss -i ./src/app.css -o ./dist/app.css --watch\"",