Skip to content
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

chore(build): unify client bundling scripts #3600

Merged
merged 1 commit into from
Dec 23, 2020

Conversation

devoto13
Copy link
Collaborator

Remove bundling logic from Grunt and introduce watch mode into the scripts/client.js. New script (npm run build:watch) allows to watch for the changes in client sources and bundle them automatically.

This also fixes a bug where npm run build could swallow errors and silently do nothing.

Fixes #3599

Remove bundling logic from Grunt and introduce watch mode into the scripts/client.js. New script (`npm run build:watch`) allows to watch for the changes in client sources and bundle them automatically.

This also fixes a bug where `npm run build` could swallow errors and silently do nothing.

Fixes karma-runner#3599
@karmarunnerbot
Copy link
Member

Build karma 416 completed (commit 10de10529f by @devoto13)

@karmarunnerbot
Copy link
Member

Build karma 415 completed (commit 10de10529f by @devoto13)

Copy link
Contributor

@johnjbarton johnjbarton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@johnjbarton johnjbarton merged commit fe0e24a into karma-runner:master Dec 23, 2020
@johnjbarton
Copy link
Contributor

Hmm. I just realized that every time I change branches I may need an npm run build. Is that correct?

@devoto13
Copy link
Collaborator Author

devoto13 commented Dec 23, 2020

@johnjbarton No, normally you don't need to run it after changing branches. Since we commit bundled client code to the repository, you only need to run npm run build after making changes to the client sources and then commit both sources and bundles.

@johnjbarton
Copy link
Contributor

but if the new branch has a change to /client/karma.js the committed static/karma.js will be out of sync with the branch right?

@devoto13
Copy link
Collaborator Author

Well, if one didn't run npm run build/hasn't committed static/karma.js in the target branch earlier, then, yes, one would need to run npm run build after the checkout. But normally one should run npm run build after making changes to the client/karma.js (or other client code) and then commit both client/karma.js and static/karma.js before leaving the branch.

@johnjbarton
Copy link
Contributor

oh yes thanks!

@devoto13 devoto13 deleted the cleanup-browserify branch December 23, 2020 20:17
@karmarunnerbot
Copy link
Member

🎉 This PR is included in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

anthony-redFox pushed a commit to anthony-redFox/karma that referenced this pull request May 16, 2023
Remove bundling logic from Grunt and introduce watch mode into the scripts/client.js. New script (`npm run build:watch`) allows to watch for the changes in client sources and bundle them automatically.

This also fixes a bug where `npm run build` could swallow errors and silently do nothing.

Fixes karma-runner#3599
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Have one way to build static/karma.js
3 participants