-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move code of the icfy-analyze CircleCI task to a NPM script #39502
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,8 +59,8 @@ | |
"npm": "^6.12.1" | ||
}, | ||
"scripts": { | ||
"preanalyze-bundles": "cross-env-shell NODE_ENV=production CALYPSO_ENV=production EMIT_STATS=true PROGRESS=true npm run -s build-client-evergreen", | ||
"analyze-bundles": "webpack-bundle-analyzer client/stats.json public/evergreen -h 127.0.0.1 -p 9898 -s gzip", | ||
"analyze-bundles": "npm run build-client-stats && webpack-bundle-analyzer client/stats.json public/evergreen -h 127.0.0.1 -p 9898 -s gzip", | ||
"analyze-icfy": "npm run build-client-stats && node --max-old-space-size=4096 bin/icfy-analyze.js && mv client/stats.json client/chart.json \"$CIRCLE_ARTIFACTS/icfy\"", | ||
"autoprefixer": "postcss -u autoprefixer -r --no-map --config packages/calypso-build/postcss.config.js", | ||
"postcss": "postcss -r --config packages/calypso-build/postcss.config.js", | ||
"prebuild": "npm run install-if-deps-outdated", | ||
|
@@ -81,6 +81,7 @@ | |
"build-client-both": "CONCURRENT_BUILDS=2 concurrently -c cyan -n \"fallback ,evergreen\" \"npm run build-client-fallback\" \"npm run build-client-evergreen\"", | ||
"build-client-if-prod": "node -e \"process.env.CALYPSO_ENV === 'production' && process.exit(1)\" || npm run build-client-both", | ||
"build-client-if-desktop": "node -e \"(process.env.CALYPSO_ENV === 'desktop' || process.env.CALYPSO_ENV === 'desktop-development') && process.exit(1)\" || npm run build-client-fallback", | ||
"build-client-stats": "cross-env-shell NODE_ENV=production CALYPSO_ENV=production EMIT_STATS=true PROGRESS=true npm run build-client-evergreen", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we have issues with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can drop
While removing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
+1. I think it's reasonable to remove the ability for non-Unix developers to generate stats while we wait for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm not sure I'd remove it permanently, more as a temporary measure. I'm hoping that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, I removed the The |
||
"build-packages": "npx lerna run prepare --stream", | ||
"build-packages:watch": "chokidar \"./packages/**\" -i \"./packages/*/dist/**\" -i \"**.css\" -i \"**.d.ts\" --debounce 1000 --throttle 10000 -c \"npm run build-packages\"", | ||
"clean": "npm run clean:packages && npm run clean:build && npm run clean:public", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's an issue with
cross-env-shell
that results in a0
exist status when we expect non-0
, this type of chaining will fail to capture that, won't it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's true. I discovered the
cross-env
issue only after migrating theicfy-analyze
task to a NPM script and debugging it.In other words, I don't expect this PR to solve any of the problems, but the refactoring still seems like a good idea to me 🙂