Initialised folder structure
This commit is contained in:
parent
d4acd3c498
commit
7b97565fa9
8 changed files with 80 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -27,3 +27,4 @@ build/Release
|
||||||
node_modules
|
node_modules
|
||||||
plugins
|
plugins
|
||||||
platforms
|
platforms
|
||||||
|
www
|
||||||
|
|
30
package.json
30
package.json
|
@ -4,7 +4,16 @@
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -17,8 +26,25 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/realorangeone/oriment#readme",
|
"homepage": "https://github.com/realorangeone/oriment#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"animate.css": "=3.4.0",
|
||||||
|
"bootstrap": "=3.3.6",
|
||||||
"cordova": "=5.4.1",
|
"cordova": "=5.4.1",
|
||||||
"ionic": "=1.7.12",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
17
scripts/build-js.sh
Executable file
17
scripts/build-js.sh
Executable file
|
@ -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
|
BIN
src/img/logo.png
Normal file
BIN
src/img/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
24
src/index.html
Normal file
24
src/index.html
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
|
||||||
|
<meta name="format-detection" content="telephone=no">
|
||||||
|
<meta name="msapplication-tap-highlight" content="no">
|
||||||
|
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/style.css">
|
||||||
|
<script type="text/javascript" src="js/jquery.js"></script>
|
||||||
|
<title>Hello World</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="app">
|
||||||
|
<h1>Apache Cordova</h1>
|
||||||
|
<div id="deviceready" class="blink">
|
||||||
|
<p class="event listening">Connecting to Device</p>
|
||||||
|
<p class="event received">Device is Ready</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="cordova.js"></script>
|
||||||
|
<script type="text/javascript" src="js/libs.js"></script>
|
||||||
|
<script type="text/javascript" src="js/app.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,3 +1,9 @@
|
||||||
|
@import "node_modules/bootstrap/less/bootstrap";
|
||||||
|
@import "node_modules/bootstrap/less/theme";
|
||||||
|
@import "node_modules/ionicons/less/ionicons";
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,400italic,700);
|
||||||
|
@import (inline) "node_modules/animate.css/animate.css";
|
||||||
|
|
||||||
* {
|
* {
|
||||||
-webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
|
-webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
|
||||||
}
|
}
|
|
@ -5,7 +5,8 @@
|
||||||
<meta name="format-detection" content="telephone=no">
|
<meta name="format-detection" content="telephone=no">
|
||||||
<meta name="msapplication-tap-highlight" content="no">
|
<meta name="msapplication-tap-highlight" content="no">
|
||||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
|
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
|
||||||
<link rel="stylesheet" type="text/css" href="css/index.css">
|
<link rel="stylesheet" type="text/css" href="css/style.css">
|
||||||
|
<script type="text/javascript" src="js/jquery.js"></script>
|
||||||
<title>Hello World</title>
|
<title>Hello World</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -17,6 +18,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="cordova.js"></script>
|
<script type="text/javascript" src="cordova.js"></script>
|
||||||
<script type="text/javascript" src="js/index.js"></script>
|
<script type="text/javascript" src="js/libs.js"></script>
|
||||||
|
<script type="text/javascript" src="js/app.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Reference in a new issue