-
Notifications
You must be signed in to change notification settings - Fork 9
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
build: make bundle compatible with Windows and test it in CI #344
Conversation
In CI, let's this npx nx bundle web-component on both Windows and Linux, and on Linux let's display the diff in a way that we can see the bits that changed even though it's minified.
Review changes with SemanticDiff. Analyzed 1 of 4 files.
|
|
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.
Good idea!
node b64Fonts.js | ||
npx webpack --config webpack.config.js | ||
packageVersion=$(npm view ../../node_modules/@readalongs/web-component version) | ||
timestamp=$(date "+%Y-%m-%d+%H-%M-%S") |
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.
Guessing that if you have bash
on Windows then you also have date
?
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.
Yeah, once you're in bash, you get the standard *nix command line tools, even on Windows, through msys, mingw64, cygwin or some derivative. I'm not aware of any instance of bash on Windows that's not based on one of those. Git systematically comes with Git Bash on Windows, that's the one I always use now, it's lightweight but has everything I need to make my Windows machine pleasant to use.
@@ -15,7 +15,7 @@ | |||
"dist/" | |||
], | |||
"scripts": { | |||
"bundle": "node b64Fonts.js && webpack --config webpack.config.js; packageVersion=$(npm view ../../node_modules/@readalongs/web-component version); timestamp=$(date \"+%Y-%m-%d+%H-%M-%S\") && cd ../studio-web && npm pkg set singleFileBundleVersion=\"${packageVersion}\" && npm pkg set singleFileBundleTimestamp=\"${timestamp}\"", | |||
"bundle": "bash bundle.sh", |
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.
well, that's ... much nicer looking
In CI, let's this npx nx bundle web-component on both Windows and Linux, and on Linux let's display the diff in a way that we can see the bits that changed even though it's minified. To make bundle compatible with Windows, I turned the one liner in `package.json` into a script that is much easier to read and maintain.
In CI, let's this npx nx bundle web-component on both Windows and Linux, and on Linux let's display the diff in a way that we can see the bits that changed even though it's minified. To make bundle compatible with Windows, I turned the one liner in `package.json` into a script that is much easier to read and maintain.
In CI, let's this npx nx bundle web-component on both Windows and Linux, and on Linux let's display the diff in a way that we can see the bits that changed even though it's minified. To make bundle compatible with Windows, I turned the one liner in `package.json` into a script that is much easier to read and maintain. (cherry picked from commit 1690f7e)
In CI, let's this npx nx bundle web-component on both Windows and Linux, and on Linux let's display the diff in a way that we can see the bits that changed even though it's minified.
PR Goal?
Make
npx nx bundle web-component
compatible with Windows, and exercise it in CIFixes?
the fact that the bundle command was specifically a bash command, but did not enforce being rush by bash
Feedback sought?
rubber stamping
Priority?
low
Tests added?
yes
How to test?
run
npx nx bundle web-component
on Windows and see it no longer failConfidence?
high
Version change?
no