From 6e81d3dad3437e34e7ec5eeacf15655d279219b5 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 19 Dec 2016 22:41:40 +0000 Subject: [PATCH] Movebuild stuff to generic place --- package.json | 4 +++- scripts/build | 7 ------- scripts/build-static.sh | 9 +++++++++ 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100755 scripts/build-static.sh diff --git a/package.json b/package.json index c09065c..c7454b7 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,11 @@ "version": "5.0.0", "description": " Source code for TheOrangeOne.net", "scripts": { + "postinstall": "npm run build", "build-js": "./scripts/build-js.sh", "build-scss": "./scripts/build-scss.sh", - "build": "npm run build-scss && npm run build-js" + "build-static": "./scripts/build-static.sh", + "build": "npm run build-static && npm run build-scss && npm run build-js" }, "repository": { "type": "git", diff --git a/scripts/build b/scripts/build index 82e1216..fa75aab 100755 --- a/scripts/build +++ b/scripts/build @@ -27,11 +27,4 @@ pip install -r requirements.txt npm install -mkdir -p static/build/js/lib static/build/fonts static/build/css static/build/img -cp -R node_modules/font-awesome/fonts static/build/ -cp -R node_modules/bootstrap-sass/assets/fonts/* static/build/fonts -cp -R static/src/img static/build - -npm run build - honcho --app-root environment --env env run env/bin/python3 manage.py collectstatic --noinput diff --git a/scripts/build-static.sh b/scripts/build-static.sh new file mode 100755 index 0000000..dda2b85 --- /dev/null +++ b/scripts/build-static.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -e + +mkdir -p static/build/js/lib static/build/fonts static/build/css static/build/img +cp -R node_modules/font-awesome/fonts static/build/ +cp -R node_modules/bootstrap-sass/assets/fonts/* static/build/fonts +cp -R static/src/img static/build +