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:
@@ -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() {
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user