1
Fork 0

Made build js file executable

This commit is contained in:
Jake Howard 2015-12-11 08:27:29 +00:00
parent 049721e43e
commit 1f239c12d6
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@
"main": "app.js", "main": "app.js",
"scripts": { "scripts": {
"lint": "eslint -c node_modules/eslint-config/.eslintrc 'static/src/js/'", "lint": "eslint -c node_modules/eslint-config/.eslintrc 'static/src/js/'",
"build-js": "bash scripts/build-js.sh", "build-js": "./scripts/build-js.sh",
"create-build-dirs": "mkdir -p static/build/js/lib static/build/fonts static/build/css static/build/img", "create-build-dirs": "mkdir -p static/build/js/lib static/build/fonts static/build/css static/build/img",
"build": "npm run create-build-dirs && npm run build-fonts && npm run build-images && npm run build-js && npm run build-less", "build": "npm run create-build-dirs && npm run build-fonts && npm run build-images && npm run build-js && npm run build-less",
"build-less": "lessc --silent static/src/less/style.less static/build/css/style.css && cleancss -d --s0 -o static/build/css/style.css static/build/css/style.css", "build-less": "lessc --silent static/src/less/style.less static/build/css/style.css && cleancss -d --s0 -o static/build/css/style.css static/build/css/style.css",

4
scripts/build-js.sh Normal file → Executable file
View file

@ -1,4 +1,4 @@
#!/usr/bin/bash #!/usr/bin/env bash
set -e set -e
@ -14,4 +14,4 @@ uglifyjs node_modules/jquery/dist/jquery.js --compress --screw-ie8 --define --st
echo ">> Building Application JS..." echo ">> Building Application JS..."
browserify -t [ babelify --presets [ es2015 react ] ] static/src/js/app.js -o static/build/js/app.js browserify -t [ babelify --presets [ es2015 react ] ] static/src/js/app.js -o static/build/js/app.js
# uglifyjs static/build/js/app.js --compress --screw-ie8 --define --stats --keep-fnames -o static/build/js/app.js # uglifyjs static/build/js/app.js --compress --screw-ie8 --define --stats --keep-fnames -o static/build/js/app.js