Skip to content

Commit 813d2c0

Browse files
committed
Starter app working
1 parent ff4ec1f commit 813d2c0

File tree

124 files changed

+159150
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+159150
-0
lines changed

.bowerrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "www/lib"
3+
}

.editorconfig

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
insert_final_newline = false
14+
trim_trailing_whitespace = false

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Specifies intentionally untracked files to ignore when using Git
2+
# http://git-scm.com/docs/gitignore
3+
4+
node_modules/
5+
platforms/
6+
plugins/

bower.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "HelloIonic",
3+
"private": "true",
4+
"devDependencies": {
5+
"ionic": "driftyco/ionic-bower#1.3.0"
6+
}
7+
}

config.xml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<widget id="com.ionicframework.showtracker328277" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3+
<name>showTracker</name>
4+
<description>
5+
An Ionic Framework and Cordova project.
6+
</description>
7+
<author email="[email protected]" href="http://example.com.com/">
8+
Your Name Here
9+
</author>
10+
<content src="index.html"/>
11+
<access origin="*"/>
12+
<preference name="webviewbounce" value="false"/>
13+
<preference name="UIWebViewBounce" value="false"/>
14+
<preference name="DisallowOverscroll" value="true"/>
15+
<preference name="SplashScreenDelay" value="1000"/>
16+
<preference name="FadeSplashScreenDuration" value="1000"/>
17+
<preference name="android-minSdkVersion" value="16"/>
18+
<preference name="BackupWebStorage" value="none"/>
19+
<preference name="SplashScreen" value="screen"/>
20+
<feature name="StatusBar">
21+
<param name="ios-package" value="CDVStatusBar" onload="true"/>
22+
</feature>
23+
<platform name="android">
24+
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
25+
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
26+
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
27+
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
28+
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
29+
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
30+
<splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
31+
<splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
32+
<splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
33+
<splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
34+
<splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
35+
<splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
36+
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
37+
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
38+
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
39+
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
40+
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
41+
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
42+
</platform>
43+
</widget>

gulpfile.js

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
var gulp = require('gulp');
2+
var gutil = require('gulp-util');
3+
var bower = require('bower');
4+
var concat = require('gulp-concat');
5+
var sass = require('gulp-sass');
6+
var minifyCss = require('gulp-minify-css');
7+
var rename = require('gulp-rename');
8+
var sh = require('shelljs');
9+
10+
var paths = {
11+
sass: ['./scss/**/*.scss']
12+
};
13+
14+
gulp.task('default', ['sass']);
15+
16+
gulp.task('sass', function(done) {
17+
gulp.src('./scss/ionic.app.scss')
18+
.pipe(sass())
19+
.on('error', sass.logError)
20+
.pipe(gulp.dest('./www/css/'))
21+
.pipe(minifyCss({
22+
keepSpecialComments: 0
23+
}))
24+
.pipe(rename({ extname: '.min.css' }))
25+
.pipe(gulp.dest('./www/css/'))
26+
.on('end', done);
27+
});
28+
29+
gulp.task('watch', function() {
30+
gulp.watch(paths.sass, ['sass']);
31+
});
32+
33+
gulp.task('install', ['git-check'], function() {
34+
return bower.commands.install()
35+
.on('log', function(data) {
36+
gutil.log('bower', gutil.colors.cyan(data.id), data.message);
37+
});
38+
});
39+
40+
gulp.task('git-check', function(done) {
41+
if (!sh.which('git')) {
42+
console.log(
43+
' ' + gutil.colors.red('Git is not installed.'),
44+
'\n Git, the version control system, is required to download Ionic.',
45+
'\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.',
46+
'\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.'
47+
);
48+
process.exit(1);
49+
}
50+
done();
51+
});

hooks/README.md

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
#!/usr/bin/env node
2+
3+
// Add Platform Class
4+
// v1.0
5+
// Automatically adds the platform class to the body tag
6+
// after the `prepare` command. By placing the platform CSS classes
7+
// directly in the HTML built for the platform, it speeds up
8+
// rendering the correct layout/style for the specific platform
9+
// instead of waiting for the JS to figure out the correct classes.
10+
11+
var fs = require('fs');
12+
var path = require('path');
13+
14+
var rootdir = process.argv[2];
15+
16+
function addPlatformBodyTag(indexPath, platform) {
17+
// add the platform class to the body tag
18+
try {
19+
var platformClass = 'platform-' + platform;
20+
var cordovaClass = 'platform-cordova platform-webview';
21+
22+
var html = fs.readFileSync(indexPath, 'utf8');
23+
24+
var bodyTag = findBodyTag(html);
25+
if(!bodyTag) return; // no opening body tag, something's wrong
26+
27+
if(bodyTag.indexOf(platformClass) > -1) return; // already added
28+
29+
var newBodyTag = bodyTag;
30+
31+
var classAttr = findClassAttr(bodyTag);
32+
if(classAttr) {
33+
// body tag has existing class attribute, add the classname
34+
var endingQuote = classAttr.substring(classAttr.length-1);
35+
var newClassAttr = classAttr.substring(0, classAttr.length-1);
36+
newClassAttr += ' ' + platformClass + ' ' + cordovaClass + endingQuote;
37+
newBodyTag = bodyTag.replace(classAttr, newClassAttr);
38+
39+
} else {
40+
// add class attribute to the body tag
41+
newBodyTag = bodyTag.replace('>', ' class="' + platformClass + ' ' + cordovaClass + '">');
42+
}
43+
44+
html = html.replace(bodyTag, newBodyTag);
45+
46+
fs.writeFileSync(indexPath, html, 'utf8');
47+
48+
process.stdout.write('add to body class: ' + platformClass + '\n');
49+
} catch(e) {
50+
process.stdout.write(e);
51+
}
52+
}
53+
54+
function findBodyTag(html) {
55+
// get the body tag
56+
try{
57+
return html.match(/<body(?=[\s>])(.*?)>/gi)[0];
58+
}catch(e){}
59+
}
60+
61+
function findClassAttr(bodyTag) {
62+
// get the body tag's class attribute
63+
try{
64+
return bodyTag.match(/ class=["|'](.*?)["|']/gi)[0];
65+
}catch(e){}
66+
}
67+
68+
if (rootdir) {
69+
70+
// go through each of the platform directories that have been prepared
71+
var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);
72+
73+
for(var x=0; x<platforms.length; x++) {
74+
// open up the index.html file at the www root
75+
try {
76+
var platform = platforms[x].trim().toLowerCase();
77+
var indexPath;
78+
79+
if(platform == 'android') {
80+
indexPath = path.join('platforms', platform, 'assets', 'www', 'index.html');
81+
} else {
82+
indexPath = path.join('platforms', platform, 'www', 'index.html');
83+
}
84+
85+
if(fs.existsSync(indexPath)) {
86+
addPlatformBodyTag(indexPath, platform);
87+
}
88+
89+
} catch(e) {
90+
process.stdout.write(e);
91+
}
92+
}
93+
94+
}

ionic.project

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "showTracker",
3+
"app_id": ""
4+
}

package.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "showtracker",
3+
"version": "1.1.1",
4+
"description": "showTracker: An Ionic project",
5+
"dependencies": {
6+
"gulp": "^3.5.6",
7+
"gulp-sass": "^2.0.4",
8+
"gulp-concat": "^2.2.0",
9+
"gulp-minify-css": "^0.3.0",
10+
"gulp-rename": "^1.2.0"
11+
},
12+
"devDependencies": {
13+
"bower": "^1.3.3",
14+
"gulp-util": "^2.2.14",
15+
"shelljs": "^0.3.0"
16+
},
17+
"cordovaPlugins": [
18+
"cordova-plugin-device",
19+
"cordova-plugin-console",
20+
"cordova-plugin-whitelist",
21+
"cordova-plugin-splashscreen",
22+
"cordova-plugin-statusbar",
23+
"ionic-plugin-keyboard"
24+
],
25+
"cordovaPlatforms": [
26+
"android"
27+
]
28+
}
2.81 KB
1.13 KB
1.76 KB
4.22 KB
7.61 KB
11.5 KB

resources/icon.png

59.4 KB

resources/ios/icon/icon-40.png

1.22 KB

resources/ios/icon/[email protected]

3.48 KB

resources/ios/icon/icon-50.png

1.86 KB

resources/ios/icon/[email protected]

4.58 KB

resources/ios/icon/icon-60.png

2.39 KB

resources/ios/icon/[email protected]

5.9 KB

resources/ios/icon/[email protected]

10.6 KB

resources/ios/icon/icon-72.png

2.8 KB

resources/ios/icon/[email protected]

7.61 KB

resources/ios/icon/icon-76.png

3.24 KB

resources/ios/icon/[email protected]

8.11 KB

resources/ios/icon/icon-small.png

818 Bytes

resources/ios/icon/[email protected]

2.23 KB

resources/ios/icon/[email protected]

3.77 KB

resources/ios/icon/icon.png

2.06 KB

resources/ios/icon/[email protected]

5.58 KB
31.2 KB

resources/ios/splash/Default-667h.png

39.5 KB

resources/ios/splash/Default-736h.png

44 KB
43.9 KB
22.1 KB
22.2 KB
18.4 KB
7.04 KB

resources/splash.png

60.8 KB

scss/ionic.app.scss

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
To customize the look and feel of Ionic, you can override the variables
3+
in ionic's _variables.scss file.
4+
5+
For example, you might change some of the default colors:
6+
7+
$light: #fff !default;
8+
$stable: #f8f8f8 !default;
9+
$positive: #387ef5 !default;
10+
$calm: #11c1f3 !default;
11+
$balanced: #33cd5f !default;
12+
$energized: #ffc900 !default;
13+
$assertive: #ef473a !default;
14+
$royal: #886aea !default;
15+
$dark: #444 !default;
16+
*/
17+
18+
// The path for our ionicons font files, relative to the built CSS in www/css
19+
$ionicons-font-path: "../lib/ionic/fonts" !default;
20+
21+
// Include all of Ionic
22+
@import "www/lib/ionic/scss/ionic";
23+

www/css/style.css

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* Empty. Add your own CSS if you like */

www/img/ionic.png

4.65 KB

0 commit comments

Comments
 (0)