diff --git a/package.json b/package.json index 252ba2d..545996e 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,13 @@ "description": "Make your computer keyboard sound like a mechanical keyboard", "main": "build/main.js", "scripts": { + "create-build-dirs": "mkdir -p build/lib build/js build/css build/img dist/ ", + "clean": "rm -rf node_modules/ dist/ build/", "build-js": " bash scripts/build-js.sh", - "start": "node_modules/.bin/electron build/", + "start": "node_modules/.bin/electron .", "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/'", + "build-html": "cp src/index.html build/index.html" }, "repository": { "type": "git", diff --git a/scripts/build-js.sh b/scripts/build-js.sh index e33edac..c5de4fd 100644 --- a/scripts/build-js.sh +++ b/scripts/build-js.sh @@ -2,15 +2,13 @@ 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/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 +browserify -t reactify src/js/app.js -o build/js/app.js +uglifyjs build/js/app.js --compress --screw-ie8 --define --stats --keep-fnames -o build/js/app.js echo ">> Building Main JS..." -uglifyjs build/main.js --compress --screw-ie8 --define --stats --keep-fnames -o src/main.js +uglifyjs src/main.js --compress --screw-ie8 --define --stats --keep-fnames -o build/main.js diff --git a/src/index.html b/src/index.html index 64233a9..cb4e9f8 100644 --- a/src/index.html +++ b/src/index.html @@ -1 +1,14 @@ -index.html \ No newline at end of file + + +
+ +