Added build dirs
This commit is contained in:
parent
d4988fe760
commit
84a884333f
6 changed files with 21 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
||||||
"description": "Make your computer keyboard sound like a mechanical keyboard",
|
"description": "Make your computer keyboard sound like a mechanical keyboard",
|
||||||
"main": "build/main.js",
|
"main": "build/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build-js"
|
"build-js": " bash scripts/build-js.sh",
|
||||||
"start": "node_modules/.bin/electron build/",
|
"start": "node_modules/.bin/electron build/",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"lint": "eslint -c node_modules/eslint-config/.eslintrc 'src/'"
|
"lint": "eslint -c node_modules/eslint-config/.eslintrc 'src/'"
|
||||||
|
|
16
scripts/build-js.sh
Normal file
16
scripts/build-js.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cp node_modules/bootstrap/dist/js/bootstrap.js static/src/js/lib/
|
||||||
|
|
||||||
|
echo ">> Building Libraries..."
|
||||||
|
uglifyjs node_modules/jquery/dist/jquery.js --compress --screw-ie8 --define --stats --keep-fnames -o build/lib/jquery.js
|
||||||
|
uglifyjs node_modules/bootstrap/dist/js/bootstrap.js --compress --screw-ie8 --define --stats --keep-fnames -o build/lib/bootstrap.js
|
||||||
|
|
||||||
|
echo ">> Building Application JS..."
|
||||||
|
browserify -t reactify src/page.js -o build/page.js
|
||||||
|
uglifyjs build/js/app.js --compress --screw-ie8 --define --stats --keep-fnames -o src/js/app.js
|
||||||
|
|
||||||
|
echo ">> Building Main JS..."
|
||||||
|
uglifyjs build/main.js --compress --screw-ie8 --define --stats --keep-fnames -o src/main.js
|
1
src/index.html
Normal file
1
src/index.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
index.html
|
1
src/js/app.js
Normal file
1
src/js/app.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
app.js
|
1
src/less/style.less
Normal file
1
src/less/style.less
Normal file
|
@ -0,0 +1 @@
|
||||||
|
style.less
|
1
src/main.js
Normal file
1
src/main.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
main.js
|
Reference in a new issue