Skip to content

Commit

Permalink
fix(scripts): specify loader via NODE_OPTIONS (#10865)
Browse files Browse the repository at this point in the history
* fix(scripts): specify loader via NODE_OPTIONS
* Add `cross-env` support

This reverts commit 095642e.

---------

Co-authored-by: Florian Dieminger <me@fiji-flo.de>
  • Loading branch information
caugner and fiji-flo committed Apr 8, 2024
1 parent ee7f9d5 commit 842c316
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -13,13 +13,13 @@
"yari-tool": "tool/cli.js"
},
"scripts": {
"ai-help-macros": "ts-node scripts/ai-help-macros.ts",
"ai-help-macros": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node scripts/ai-help-macros.ts",
"analyze": "source-map-explorer 'client/build/static/js/*.js'",
"analyze:css": "source-map-explorer 'client/build/static/css/*.css'",
"build": "cross-env NODE_ENV=production NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node build/cli.ts",
"build:blog": "cross-env NODE_ENV=production ts-node build/build-blog.ts",
"build:blog": "cross-env NODE_ENV=production NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node build/build-blog.ts",
"build:client": "cd client && cross-env NODE_ENV=production BABEL_ENV=production INLINE_RUNTIME_CHUNK=false node scripts/build.js",
"build:curriculum": "cross-env NODE_ENV=production ts-node build/build-curriculum.ts",
"build:curriculum": "cross-env NODE_ENV=production NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node build/build-curriculum.ts",
"build:dist": "tsc -p tsconfig.dist.json",
"build:glean": "cd client && cross-env VIRTUAL_ENV=venv glean translate src/telemetry/metrics.yaml src/telemetry/pings.yaml -f typescript -o src/telemetry/generated",
"build:prepare": "yarn build:client && yarn build:ssr && yarn tool optimize-client-build && yarn tool google-analytics-code && yarn tool popularities && yarn tool spas && yarn tool gather-git-history && yarn tool build-robots-txt",
Expand All @@ -29,19 +29,19 @@
"check:tsc": "find . -name 'tsconfig.json' ! -wholename '**/node_modules/**' -print0 | xargs -n1 -P 2 -0 sh -c 'cd `dirname $0` && echo \"🔄 $(pwd)\" && npx tsc --noEmit && echo \"☑️ $(pwd)\" || exit 255'",
"dev": "yarn build:prepare && nf -j Procfile.dev start",
"eslint": "eslint .",
"filecheck": "ts-node filecheck/cli.ts",
"filecheck": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node filecheck/cli.ts",
"install:all": "find . -mindepth 2 -name 'yarn.lock' ! -wholename '**/node_modules/**' -print0 | xargs -n1 -0 sh -cx 'yarn --cwd $(dirname $0) install'",
"install:all:npm": "find . -mindepth 2 -name 'package-lock.json' ! -wholename '**/node_modules/**' -print0 | xargs -n1 -0 sh -cx 'npm --prefix $(dirname $0) install'",
"jest": "node --experimental-vm-modules --expose-gc ./node_modules/.bin/jest --logHeapUsage",
"m2h": "ts-node markdown/m2h/cli.ts",
"m2h": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node markdown/m2h/cli.ts",
"prepack": "yarn build:dist",
"prepare": "(husky || true) && yarn install:all && yarn install:all:npm",
"prettier-check": "prettier --check .",
"prettier-format": "prettier --write .",
"start": "(test -f client/build/index.html || yarn build:client) && (test -f ssr/dist/main.js || yarn build:ssr) && (test -f popularities.json || yarn tool popularities) && (test -d client/build/en-us/_spas || yarn tool spas) && nf -j Procfile.start start",
"start:client": "cd client && cross-env NODE_ENV=development BABEL_ENV=development BROWSER=none PORT=3000 node scripts/start.js",
"start:server": "node-dev --experimental-loader ts-node/esm server/index.ts",
"start:static-server": "ts-node server/static.ts",
"start:static-server": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node server/static.ts",
"style-dictionary": "style-dictionary build -c sd-config.js",
"stylelint": "stylelint \"**/*.scss\"",
"test": "yarn prettier-check && yarn test:client && yarn test:kumascript && yarn test:libs && yarn test:content && yarn test:testing",
Expand Down

0 comments on commit 842c316

Please sign in to comment.