-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: make bundle compatible with Windows and test it in CI (#344)
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.
- Loading branch information
Showing
4 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# This script is used to bundle the web component for including in Offline HTML files | ||
# created by studio-web | ||
|
||
set -o errexit | ||
set -o verbose | ||
|
||
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") | ||
cd ../studio-web | ||
npm pkg set singleFileBundleVersion="${packageVersion}" | ||
npm pkg set singleFileBundleTimestamp="${timestamp}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters