1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

refactor(pwa): revert to JS and Liquid mixing

The gem package won't be able to pass `/sw.min.js` to the user end
This commit is contained in:
Cotes Chung
2024-02-13 23:35:32 +08:00
parent 90693ff95e
commit 6b34901d94
9 changed files with 25 additions and 51 deletions

View File

@@ -103,7 +103,7 @@ init_files() {
npm i && npm run build
# track the js output
_sedi "/^assets.*\/dist/d;/^sw.*\.js/d" .gitignore
_sedi "/^assets.*\/dist/d" .gitignore
}
commit() {

View File

@@ -27,7 +27,6 @@ NODE_CONFIG="package.json"
CHANGE_LOG="docs/CHANGELOG.md"
JS_DIST="assets/js/dist"
PWA_SW="sw.min.js"
BACKUP_PATH="$(mktemp -d)"
FILES=(
@@ -159,7 +158,7 @@ build_gem() {
rm -f ./*.gem
npm run build
git add "$JS_DIST" "$PWA_SW" -f # add JS distribution files to gem
git add "$JS_DIST" -f # add JS distribution files to gem
gem build "$GEM_SPEC"
cp "$JS_DIST"/* "$BACKUP_PATH"