Skip to content

Commit

Permalink
chore: use pnpm shell-emulator instead of cross-env (#10023)
Browse files Browse the repository at this point in the history
  • Loading branch information
kecrily committed Sep 7, 2022
1 parent 1b822d0 commit 9f8d79b
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 72 deletions.
1 change: 1 addition & 0 deletions .npmrc
Expand Up @@ -6,3 +6,4 @@ hoist-pattern[]=pug
hoist-pattern[]=source-map-support
hoist-pattern[]=ts-node
strict-peer-dependencies=false
shell-emulator=true
13 changes: 6 additions & 7 deletions package.json
Expand Up @@ -20,17 +20,17 @@
"typecheck": "tsc -p scripts --noEmit && tsc -p playground --noEmit",
"test": "run-s test-unit test-serve test-build",
"test-serve": "vitest run -c vitest.config.e2e.ts",
"test-build": "cross-env VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
"test-build-without-plugin-commonjs": "cross-env VITE_TEST_WITHOUT_PLUGIN_COMMONJS=1 pnpm test-build",
"test-build": "VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
"test-build-without-plugin-commonjs": "VITE_TEST_WITHOUT_PLUGIN_COMMONJS=1 pnpm test-build",
"test-unit": "vitest run",
"test-docs": "pnpm run docs-build",
"debug-serve": "cross-env VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts",
"debug-build": "cross-env VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c vitest.config.e2e.ts",
"debug-serve": "VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts",
"debug-build": "VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c vitest.config.e2e.ts",
"docs": "vitepress dev docs",
"docs-build": "vitepress build docs",
"docs-serve": "vitepress serve docs",
"build": "pnpm -r --filter=./packages/* run build",
"dev": "pnpm -r --parallel --filter=./packages/* run dev",
"build": "pnpm -r --filter='./packages/*' run build",
"dev": "pnpm -r --parallel --filter='./packages/*' run dev",
"release": "tsx scripts/release.ts",
"ci-publish": "tsx scripts/publishCI.ts",
"ci-docs": "run-s build docs-build"
Expand Down Expand Up @@ -60,7 +60,6 @@
"@typescript-eslint/eslint-plugin": "^5.36.1",
"@typescript-eslint/parser": "^5.36.1",
"conventional-changelog-cli": "^2.2.2",
"cross-env": "^7.0.3",
"esbuild": "^0.14.47",
"eslint": "^8.23.0",
"eslint-define-config": "^1.7.0",
Expand Down
7 changes: 2 additions & 5 deletions playground/env/package.json
Expand Up @@ -3,12 +3,9 @@
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "cross-env VITE_INLINE=inline-serve vite",
"build": "cross-env VITE_INLINE=inline-build vite build",
"dev": "VITE_INLINE=inline-serve vite",
"build": "VITE_INLINE=inline-build vite build",
"debug": "node --inspect-brk ../../packages/vite/bin/vite",
"preview": "vite preview"
},
"devDependencies": {
"cross-env": "^7.0.3"
}
}
3 changes: 1 addition & 2 deletions playground/json/package.json
Expand Up @@ -8,11 +8,10 @@
"debug": "node --inspect-brk ../../packages/vite/bin/vite",
"preview": "vite preview",
"dev:ssr": "node server",
"serve:ssr": "cross-env NODE_ENV=production node server",
"serve:ssr": "NODE_ENV=production node server",
"debug:ssr": "node --inspect-brk server"
},
"devDependencies": {
"cross-env": "^7.0.3",
"express": "^4.18.1",
"json-module": "file:./json-module",
"vue": "^3.2.38"
Expand Down
7 changes: 3 additions & 4 deletions playground/react-sourcemap/package.json
Expand Up @@ -4,9 +4,9 @@
"version": "0.0.0",
"scripts": {
"dev": "vite",
"dev:classic": "cross-env USE_CLASSIC=1 vite",
"dev:classic": "USE_CLASSIC=1 vite",
"build": "vite build",
"build:classic": "cross-env USE_CLASSIC=1 vite build",
"build:classic": "USE_CLASSIC=1 vite build",
"debug": "node --inspect-brk ../../packages/vite/bin/vite",
"preview": "vite preview"
},
Expand All @@ -15,7 +15,6 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@vitejs/plugin-react": "workspace:*",
"cross-env": "^7.0.3"
"@vitejs/plugin-react": "workspace:*"
}
}
3 changes: 1 addition & 2 deletions playground/ssr-deps/package.json
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "node server",
"serve": "cross-env NODE_ENV=production node server",
"serve": "NODE_ENV=production node server",
"debug": "node --inspect-brk server"
},
"dependencies": {
Expand All @@ -32,7 +32,6 @@
"pkg-exports": "file:./pkg-exports"
},
"devDependencies": {
"cross-env": "^7.0.3",
"express": "^4.18.1"
}
}
3 changes: 1 addition & 2 deletions playground/ssr-html/package.json
Expand Up @@ -5,12 +5,11 @@
"type": "module",
"scripts": {
"dev": "node server",
"serve": "cross-env NODE_ENV=production node server",
"serve": "NODE_ENV=production node server",
"debug": "node --inspect-brk server"
},
"dependencies": {},
"devDependencies": {
"cross-env": "^7.0.3",
"express": "^4.18.1"
}
}
3 changes: 1 addition & 2 deletions playground/ssr-pug/package.json
Expand Up @@ -5,11 +5,10 @@
"type": "module",
"scripts": {
"dev": "node server",
"serve": "cross-env NODE_ENV=production node server",
"serve": "NODE_ENV=production node server",
"debug": "node --inspect-brk server"
},
"devDependencies": {
"cross-env": "^7.0.3",
"express": "^4.18.1",
"pug": "^3.0.2"
}
Expand Down
3 changes: 1 addition & 2 deletions playground/ssr-react/package.json
Expand Up @@ -9,7 +9,7 @@
"build:client": "vite build --outDir dist/client",
"build:server": "vite build --ssr src/entry-server.jsx --outDir dist/server",
"generate": "vite build --outDir dist/static && npm run build:server && node prerender",
"serve": "cross-env NODE_ENV=production node server",
"serve": "NODE_ENV=production node server",
"debug": "node --inspect-brk server"
},
"dependencies": {
Expand All @@ -20,7 +20,6 @@
"devDependencies": {
"@vitejs/plugin-react": "workspace:*",
"compression": "^1.7.4",
"cross-env": "^7.0.3",
"express": "^4.18.1",
"serve-static": "^1.15.0"
}
Expand Down
3 changes: 1 addition & 2 deletions playground/ssr-vue/package.json
Expand Up @@ -11,7 +11,7 @@
"build:server": "vite build --ssr src/entry-server.js --outDir dist/server",
"build:server:noExternal": "vite build --config vite.config.noexternal.js --ssr src/entry-server.js --outDir dist/server",
"generate": "vite build --ssrManifest --outDir dist/static && npm run build:server && node prerender",
"serve": "cross-env NODE_ENV=production node server",
"serve": "NODE_ENV=production node server",
"debug": "node --inspect-brk server"
},
"dependencies": {
Expand All @@ -24,7 +24,6 @@
"@vitejs/plugin-vue": "workspace:*",
"@vitejs/plugin-vue-jsx": "workspace:*",
"compression": "^1.7.4",
"cross-env": "^7.0.3",
"dep-import-type": "link:./dep-import-type",
"express": "^4.18.1",
"serve-static": "^1.15.0"
Expand Down
3 changes: 1 addition & 2 deletions playground/ssr-webworker/package.json
Expand Up @@ -4,14 +4,13 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "cross-env DEV=1 node worker",
"dev": "DEV=1 node worker",
"build:worker": "vite build --ssr src/entry-worker.jsx --outDir dist/worker"
},
"dependencies": {
"react": "^18.2.0"
},
"devDependencies": {
"cross-env": "^7.0.3",
"miniflare": "^1.4.1",
"resolve-linked": "workspace:*"
}
Expand Down
24 changes: 12 additions & 12 deletions playground/worker/package.json
Expand Up @@ -9,18 +9,18 @@
"dev:es": "vite --config ./vite.config-es.js dev",
"build:es": "vite --config ./vite.config-es.js build",
"preview:es": "vite --config ./vite.config-es.js preview",
"dev:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js dev",
"build:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js build",
"preview:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js preview",
"dev:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js dev",
"build:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js build",
"preview:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js preview",
"dev:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js dev",
"build:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js build",
"preview:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js preview",
"dev:relative-base": "cross-env WORKER_MODE=inline vite --config ./vite.config-relative-base.js dev",
"build:relative-base": "cross-env WORKER_MODE=inline vite --config ./vite.config-relative-base.js build",
"preview:relative-base": "cross-env WORKER_MODE=inline vite --config ./vite.config-relative-base.js preview",
"dev:sourcemap": "WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js dev",
"build:sourcemap": "WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js build",
"preview:sourcemap": "WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js preview",
"dev:sourcemap-hidden": "WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js dev",
"build:sourcemap-hidden": "WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js build",
"preview:sourcemap-hidden": "WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js preview",
"dev:sourcemap-inline": "WORKER_MODE=inline vite --config ./vite.config-sourcemap.js dev",
"build:sourcemap-inline": "WORKER_MODE=inline vite --config ./vite.config-sourcemap.js build",
"preview:sourcemap-inline": "WORKER_MODE=inline vite --config ./vite.config-sourcemap.js preview",
"dev:relative-base": "WORKER_MODE=inline vite --config ./vite.config-relative-base.js dev",
"build:relative-base": "WORKER_MODE=inline vite --config ./vite.config-relative-base.js build",
"preview:relative-base": "WORKER_MODE=inline vite --config ./vite.config-relative-base.js preview",
"debug": "node --inspect-brk ../../packages/vite/bin/vite"
},
"dependencies": {
Expand Down
31 changes: 1 addition & 30 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9f8d79b

Please sign in to comment.