diff --git a/.gitignore b/.gitignore index 00de184..3288b5d 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ build/Release node_modules plugins platforms +www diff --git a/package.json b/package.json index 9b79b76..e75c1f5 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,16 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "create-build-dirs": "mkdir -p www/js www/css www/img", + "test": "npm run lint", + "build": "npm run create-build-dirs && npm run build-fonts && npm run build-images && npm run build-html && npm run build-js && npm run build-less", + "build-html": "cp src/index.html www/", + "build-fonts": "cp -R node_modules/bootstrap/dist/fonts www && cp -R node_modules/ionicons/fonts www ", + "build-less": "lessc --silent src/less/style.less www/css/style.css && cleancss -d --s0 -o www/css/style.css www/css/style.css", + "build-js": "./scripts/build-js.sh", + "build-images": "cp -r src/img/* www/img/", + "lint": "eslint -c node_modules/eslint-config/.eslintrc '/src/js/'", + "clean": "rm -rf www platforms/ plugins/ node_modules/" }, "repository": { "type": "git", @@ -17,8 +26,25 @@ }, "homepage": "https://github.com/realorangeone/oriment#readme", "dependencies": { + "animate.css": "=3.4.0", + "bootstrap": "=3.3.6", "cordova": "=5.4.1", "ionic": "=1.7.12", - "ionicons": "=2.0.1" + "ionicons": "=2.0.1", + "jquery": "=2.1.4", + "less": "=2.5.3", + "markdown": "=0.5.0", + "react": "=0.14.3" + }, + "devDependencies": { + "babel-preset-es2015": "=6.3.13", + "babel-preset-react": "=6.3.13", + "babelify": "=7.2.0", + "browserify": "=12.0.1", + "clean-css": "=3.4.8", + "eslint": "=1.10.3", + "eslint-config": "git://github.com/dabapps/eslint-config.git", + "eslint-plugin-react": "=3.11.3", + "uglify-js": "=2.6.1" } } diff --git a/scripts/build-js.sh b/scripts/build-js.sh new file mode 100755 index 0000000..555831a --- /dev/null +++ b/scripts/build-js.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -e + +echo ">> Building Libraries..." +mkdir -p www/js/lib +uglifyjs node_modules/markdown/lib/markdown.js --compress --screw-ie8 --define --stats --keep-fnames -o www/js/lib/markdown.js +uglifyjs node_modules/bootstrap/dist/js/bootstrap.js --compress --screw-ie8 --define --stats --keep-fnames -o www/js/lib/bootstrap.js +uglifyjs www/js/lib/* --compress --screw-ie8 --define --stats --keep-fnames -o www/js/libs.js +rm -rf www/js/lib + +echo ">> Building JQuery..." +uglifyjs node_modules/jquery/dist/jquery.js --compress --screw-ie8 --define --stats --keep-fnames -o www/js/jquery.js + +echo ">> Building Application JS..." +browserify -t [ babelify --presets [ es2015 react ] ] src/js/app.js -o www/js/app.js +# uglifyjs www/js/app.js --compress --screw-ie8 --define --stats --keep-fnames -o www/js/app.js diff --git a/src/img/logo.png b/src/img/logo.png new file mode 100644 index 0000000..9519e7d Binary files /dev/null and b/src/img/logo.png differ diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..10f20ad --- /dev/null +++ b/src/index.html @@ -0,0 +1,24 @@ + + +
+ + + + + + +Connecting to Device
+Device is Ready
+