diff --git a/package.json b/package.json index 901e0bb..252ba2d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Make your computer keyboard sound like a mechanical keyboard", "main": "build/main.js", "scripts": { - "build-js" + "build-js": " bash scripts/build-js.sh", "start": "node_modules/.bin/electron build/", "test": "echo \"Error: no test specified\" && exit 1", "lint": "eslint -c node_modules/eslint-config/.eslintrc 'src/'" diff --git a/scripts/build-js.sh b/scripts/build-js.sh new file mode 100644 index 0000000..e33edac --- /dev/null +++ b/scripts/build-js.sh @@ -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 diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..64233a9 --- /dev/null +++ b/src/index.html @@ -0,0 +1 @@ +index.html \ No newline at end of file diff --git a/src/js/app.js b/src/js/app.js new file mode 100644 index 0000000..f9602e9 --- /dev/null +++ b/src/js/app.js @@ -0,0 +1 @@ +app.js \ No newline at end of file diff --git a/src/less/style.less b/src/less/style.less new file mode 100644 index 0000000..a7fa169 --- /dev/null +++ b/src/less/style.less @@ -0,0 +1 @@ +style.less \ No newline at end of file diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..82df346 --- /dev/null +++ b/src/main.js @@ -0,0 +1 @@ +main.js \ No newline at end of file