Swap out parcel for esbuild
This commit is contained in:
parent
ca4a364422
commit
3053dc6656
6 changed files with 317 additions and 5385 deletions
|
@ -31,13 +31,13 @@
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
||||||
{{ partial "script.html" "js/jquery.js" }}
|
{{ partial "script.html" "js/jquery.min.js" }}
|
||||||
|
|
||||||
{{ if eq .Params.layout "flickr" }}
|
{{ if eq .Params.layout "flickr" }}
|
||||||
{{ partial "script_async.html" "js/lightgallery.js" }}
|
{{ partial "script_async.html" "js/lightgallery.min.js" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "script_async.html" "js/bootstrap.js" }}
|
{{ partial "script_async.html" "js/bootstrap.min.js" }}
|
||||||
|
|
||||||
{{ partial "script_async.html" "js/app.js" }}
|
{{ partial "script_async.html" "js/app.js" }}
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,9 @@
|
||||||
{{ $script := resources.Get . | minify | fingerprint }}
|
{{ $script := resources.Get . }}
|
||||||
|
|
||||||
|
{{ if in . "min" }}
|
||||||
|
{{ $script = $script | minify | fingerprint }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $script = $script | js.Build (dict "minify" true) | fingerprint }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<script type="text/javascript" src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script>
|
<script type="text/javascript" src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script>
|
||||||
|
|
|
@ -1,2 +1,9 @@
|
||||||
{{ $script := resources.Get . | minify | fingerprint }}
|
{{ $script := resources.Get . }}
|
||||||
|
|
||||||
|
{{ if in . "min" }}
|
||||||
|
{{ $script = $script | minify | fingerprint }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $script = $script | js.Build (dict "minify" true) | fingerprint }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<script type="text/javascript" async src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script>
|
<script type="text/javascript" async src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script>
|
||||||
|
|
5664
package-lock.json
generated
5664
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,6 @@
|
||||||
"elevator.js": "1.0.1",
|
"elevator.js": "1.0.1",
|
||||||
"jquery": "3.5.1",
|
"jquery": "3.5.1",
|
||||||
"lg-thumbnail": "1.1.0",
|
"lg-thumbnail": "1.1.0",
|
||||||
"lightgallery": "1.8.0",
|
"lightgallery": "1.8.0"
|
||||||
"parcel-bundler": "1.12.4"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,9 @@ source ./scripts/common.sh
|
||||||
rm -rf $OUTPUT_DIR
|
rm -rf $OUTPUT_DIR
|
||||||
rm -rf $STATIC_BUILD
|
rm -rf $STATIC_BUILD
|
||||||
rm -rf $BASEDIR/resources
|
rm -rf $BASEDIR/resources
|
||||||
|
|
||||||
mkdir -p $STATIC_BUILD/js $STATIC_BUILD/css $STATIC_BUILD/audio
|
mkdir -p $STATIC_BUILD/js $STATIC_BUILD/css $STATIC_BUILD/audio
|
||||||
|
|
||||||
cp -r $BASEDIR/node_modules/lightgallery/dist/fonts $STATIC_BUILD
|
cp -r $BASEDIR/node_modules/lightgallery/dist/fonts $STATIC_BUILD
|
||||||
cp -r $STATIC_SRC/img $STATIC_BUILD/img
|
cp -r $STATIC_SRC/img $STATIC_BUILD/img
|
||||||
cp -r $BASEDIR/node_modules/lightgallery/dist/img/* $STATIC_BUILD/img
|
cp -r $BASEDIR/node_modules/lightgallery/dist/img/* $STATIC_BUILD/img
|
||||||
|
@ -15,13 +17,12 @@ cp -r $BASEDIR/node_modules/@fortawesome/fontawesome-free/css/all.min.css $STATI
|
||||||
cp $BASEDIR/node_modules/lightgallery/dist/css/lightgallery.min.css $STATIC_BUILD/css/lightgallery.css
|
cp $BASEDIR/node_modules/lightgallery/dist/css/lightgallery.min.css $STATIC_BUILD/css/lightgallery.css
|
||||||
cp -r $BASEDIR/node_modules/@fortawesome/fontawesome-free/webfonts $STATIC_BUILD
|
cp -r $BASEDIR/node_modules/@fortawesome/fontawesome-free/webfonts $STATIC_BUILD
|
||||||
|
|
||||||
cp $BASEDIR/node_modules/jquery/dist/jquery.min.js $STATIC_BUILD/js/jquery.js
|
cp $STATIC_SRC/js/app.js $STATIC_BUILD/js/app.js
|
||||||
cp $BASEDIR/node_modules/lightgallery/dist/js/lightgallery-all.min.js $STATIC_BUILD/js/lightgallery.js
|
cp $BASEDIR/node_modules/jquery/dist/jquery.min.js $STATIC_BUILD/js/jquery.min.js
|
||||||
cp $BASEDIR/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js $STATIC_BUILD/js/bootstrap.js
|
cp $BASEDIR/node_modules/lightgallery/dist/js/lightgallery-all.min.js $STATIC_BUILD/js/lightgallery.min.js
|
||||||
|
cp $BASEDIR/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js $STATIC_BUILD/js/bootstrap.min.js
|
||||||
cp $BASEDIR/node_modules/elevator.js/demo/music/*.mp3 $STATIC_BUILD/audio/
|
cp $BASEDIR/node_modules/elevator.js/demo/music/*.mp3 $STATIC_BUILD/audio/
|
||||||
|
|
||||||
parcel build --no-source-maps -d $STATIC_BUILD/js/ $STATIC_SRC/js/app.js
|
|
||||||
|
|
||||||
cp -r $STATIC_SRC/scss $STATIC_BUILD/scss
|
cp -r $STATIC_SRC/scss $STATIC_BUILD/scss
|
||||||
hugo gen chromastyles --style=monokai > $STATIC_BUILD/css/highlight.css
|
hugo gen chromastyles --style=monokai > $STATIC_BUILD/css/highlight.css
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue