1
Fork 0

Use parcel for JS bundling

This commit is contained in:
Jake Howard 2018-06-17 12:03:33 +01:00
parent 0401ee2cf5
commit 7db8cdd1bc
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 5398 additions and 483 deletions

5863
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -8,10 +8,10 @@
"author": "Jake Howard <git@theorangeone.net>", "author": "Jake Howard <git@theorangeone.net>",
"devDependencies": { "devDependencies": {
"broken-link-checker-local": "0.2.0", "broken-link-checker-local": "0.2.0",
"browserify": "16.2.2",
"eslint-config-dabapps": "github:dabapps/eslint-config-dabapps#v3.0.0", "eslint-config-dabapps": "github:dabapps/eslint-config-dabapps#v3.0.0",
"markdown-spellcheck": "1.3.1", "markdown-spellcheck": "1.3.1",
"node-sass": "4.9.0", "node-sass": "4.9.0",
"parcel-bundler": "1.9.1",
"sass-lint": "1.12.1", "sass-lint": "1.12.1",
"yaml-lint": "1.2.3" "yaml-lint": "1.2.3"
}, },

View file

@ -9,15 +9,15 @@ rm -rf $STATIC_BUILD
rm -rf $BASEDIR/resources rm -rf $BASEDIR/resources
mkdir -p $STATIC_BUILD/js $STATIC_BUILD/css mkdir -p $STATIC_BUILD/js $STATIC_BUILD/css
hugo gen chromastyles --style=tango > $STATIC_SRC/scss/highlight.css hugo gen chromastyles --style=tango > $STATIC_SRC/scss/highlight.css
browserify $STATIC_SRC/js/index.js -o $STATIC_BUILD/js/app.js
node-sass $STATIC_SRC/scss/style.scss $STATIC_BUILD/css/style.css --source-map-embed
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 node_modules/mermaid/dist/mermaid.min.js $STATIC_BUILD/js/mermaid.min.js cp -r $BASEDIR/node_modules/lightgallery/dist/img/* $STATIC_BUILD/img
parcel build $STATIC_SRC/js/index.js -d $STATIC_BUILD/js/ -o app.js
node-sass $STATIC_SRC/scss/style.scss $STATIC_BUILD/css/style.css --source-map-embed
cp $BASEDIR/node_modules/mermaid/dist/mermaid.min.js $STATIC_BUILD/js/mermaid.min.js
hugo -vDEF --stepAnalysis --gc hugo -vDEF --stepAnalysis --gc
mkdir -p $OUTPUT_DIR/.well-known/
mkdir -p $OUTPUT_DIR/.well-known/
cp $BASEDIR/static/keybase.txt $OUTPUT_DIR/keybase.txt cp $BASEDIR/static/keybase.txt $OUTPUT_DIR/keybase.txt
cp $BASEDIR/static/security.txt $OUTPUT_DIR/.well-known/security.txt cp $BASEDIR/static/security.txt $OUTPUT_DIR/.well-known/security.txt