1
Fork 0

Install materialize and FA to actually check static build works nicely

Note: It didn't
This commit is contained in:
Jake Howard 2020-04-12 17:48:03 +01:00
parent 8ae997e45f
commit e42e67efdc
Signed by: jake
GPG key ID: 57AFB45680EDD477
5 changed files with 564 additions and 5872 deletions

6406
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -3,15 +3,14 @@
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"description": "Another website, really?", "description": "Another website, really?",
"scripts": {
"build": "parcel build --no-source-maps -d static/build static/src/scss/index.scss"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/RealOrangeOne/website.git" "url": "git+https://github.com/RealOrangeOne/website.git"
}, },
"homepage": "https://github.com/RealOrangeOne/website#readme", "homepage": "https://github.com/RealOrangeOne/website#readme",
"dependencies": { "dependencies": {
"parcel-bundler": "1.12.4" "@fortawesome/fontawesome-free": "5.13.0",
"materialize-css": "1.0.0",
"node-sass": "4.13.1"
} }
} }

18
scripts/build-static.sh Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env bash
export PATH=node_modules/.bin:${PATH}
set -ex
rm -rf static/build
mkdir -p static/build/css static/build/js
node-sass --include-path node_modules/ -q static/src/scss/index.scss static/build/css/index.css
# Install materialize CSS
cp node_modules/materialize-css/dist/js/materialize.min.js static/build/js/materialize.min.js
# Install fontawesome
cp node_modules/@fortawesome/fontawesome-free/css/all.min.css static/build/css/font-awesome.min.css
cp -r node_modules/@fortawesome/fontawesome-free/webfonts static/build/

View file

@ -15,6 +15,6 @@ fi
npm ci npm ci
npm run build ./scripts/build-static.sh
./manage.py collectstatic --noinput ./manage.py collectstatic --noinput --clear -v 2

View file

@ -0,0 +1 @@
@import "materialize-css/sass/materialize";