chore: add cross-env for setting cmd env vars

This is to add support for setting environment variables while running some commands, e.g. `FORCE_COLOR=1 next dev` which will not work on windows machine natively.
This commit is contained in:
Hiren Chauhan 2023-05-24 13:26:18 +05:30
parent 3571d775fa
commit 40cf209c61
No known key found for this signature in database
GPG key ID: FCF2B1492A1C9DE2
2 changed files with 16 additions and 7 deletions

View file

@ -3,18 +3,18 @@
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "FORCE_COLOR=1 next dev",
"dev": "cross-env FORCE_COLOR=1 next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint:fix": "next lint --fix",
"prettier": "prettier --check \"**/*.{js,jsx,ts,tsx}\"",
"prettier:fix": "prettier --write \"**/*.{js,jsx,ts,tsx}\"",
"analyze": "ANALYZE=true yarn build",
"storybook": "FORCE_COLOR=1 storybook dev -p 6006",
"test-storybook": "FORCE_COLOR=1 test-storybook",
"build-storybook": "FORCE_COLOR=1 storybook build",
"test": "FORCE_COLOR=1 jest --passWithNoTests",
"analyze": "cross-env ANALYZE=true yarn build",
"storybook": "cross-env FORCE_COLOR=1 storybook dev -p 6006",
"test-storybook": "cross-env FORCE_COLOR=1 test-storybook",
"build-storybook": "cross-env FORCE_COLOR=1 storybook build",
"test": "cross-env FORCE_COLOR=1 jest --passWithNoTests",
"e2e:headless": "playwright test",
"e2e:ui": "playwright test --ui",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
@ -78,6 +78,7 @@
"@typescript-eslint/parser": "^5.54.1",
"all-contributors-cli": "^6.24.0",
"autoprefixer": "^10.4.14",
"cross-env": "^7.0.3",
"eslint": "8.41.0",
"eslint-config-next": "13.4.3",
"eslint-config-prettier": "^8.3.0",