Skip to content

Commit

Permalink
Merge pull request #16 from openpearl/develop
Browse files Browse the repository at this point in the history
Version 1.0
  • Loading branch information
hdavidzhu committed Jul 24, 2015
2 parents 8b3cfcd + 10184fa commit dcccea7
Show file tree
Hide file tree
Showing 120 changed files with 1,957 additions and 613 deletions.
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
node_modules

www/_templates/
www/assets/lib
www/app/bundle.js

node_modules

.tmp
.sass-cache
<%= appPath %>/bower_components
coverage
platforms
resources
plugins
*.swp
*.swo
*.log
*.DS_Store
DS_Store/
.DS_Store/
4 changes: 4 additions & 0 deletions .sublime-settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"folder_exclude_patterns": ["platforms"],
"font_size": 12
}
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,33 @@
# Pearl: iOS Client

iOS app for your personal assistant to your health.

##Running Instructions
Make sure you have XCode and Node.JS. Install Ionic in the [following instructions](https://www.youtube.com/watch?v=1RQCjwnlTRk), and run the app using:
## About

PearlClient is the code repository for Pearl's iOS app. Inspired by apps such as [Lark](TODO: Future Link Here), PearlClient wants to bring friendly and intelligent health assistance with an open source community.

You can find out more about [Pearl at our homepage](https://www.openpearl.org).

Pearl is developed at [Involution Studios](https://www.goinvo.com/) in [Arlington, MA](TODO: Google Maps).

## For Developers

### Setup

* Make sure you have [XCode](TODO: Link to XCode) and [Node.JS](https://www.nodejs.org).

* Install Ionic in the [following instructions](https://www.youtube.com/watch?v=1RQCjwnlTRk).

* Install all dependencies using `npm install` and `bower install`.

* Run the app in the emulator using `ionic emulate ios`.

* Additional details can be found at the [Ionic Framework documentation](TODO: Link to Ionic install).

### Fun Facts

* PearlClient is developed using Ionic, a framework built on top of Angular for Cordova native application experiences.

* Most (if not all) of Pearl's intelligence is within our servers. The client applications only communicate and display data to the user in a friendly manner.

```ionic emulate ios```
* Keeping to a centralized "brain" helps us introduce new devices, such as Android and Echo, in a fast and decoupled way.
8 changes: 6 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
"name": "pearl-client",
"private": "true",
"devDependencies": {
"ionic": "driftyco/ionic-bower#1.0.0"
"ionic": "driftyco/ionic-bower#1.0.0",
"angular-mocks": "1.3.13"
},
"dependencies": {
"ngCordova": "~0.1.17-alpha",
"underscore": "~1.8.3",
"moment": "~2.10.3",
"ionic": "~1.0.0"
"ionic": "~1.0.0",
"ng-token-auth": "~0.0.25",
"angular-cookie": "~4.0.8",
"angular-toArrayFilter": "~1.0.1"
}
}
27 changes: 6 additions & 21 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.InvoStudios.Pearl" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>pearl-client</name>
<name>Pearl</name>
<description>
An Ionic Framework and Cordova project.
Your personal health assistant.
</description>
<author email="[email protected]" href="http://openpearl.org/">
Ionic Framework Team
Involution Studios
</author>
<content src="index.html"/>
<access origin="*"/>
Expand All @@ -14,25 +14,10 @@
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="3000"/>
<preference name="SplashScreen" value="none"/>
<preference name="SplashScreenDelay" value="0"/>
<platform name="ios">
<icon height="57" src="resources/ios/icon/icon.png" width="57"/>
<icon height="114" src="resources/ios/icon/[email protected]" width="114"/>
<icon height="40" src="resources/ios/icon/icon-40.png" width="40"/>
<icon height="80" src="resources/ios/icon/[email protected]" width="80"/>
<icon height="50" src="resources/ios/icon/icon-50.png" width="50"/>
<icon height="100" src="resources/ios/icon/[email protected]" width="100"/>
<icon height="60" src="resources/ios/icon/icon-60.png" width="60"/>
<icon height="120" src="resources/ios/icon/[email protected]" width="120"/>
<icon height="180" src="resources/ios/icon/[email protected]" width="180"/>
<icon height="72" src="resources/ios/icon/icon-72.png" width="72"/>
<icon height="144" src="resources/ios/icon/[email protected]" width="144"/>
<icon height="76" src="resources/ios/icon/icon-76.png" width="76"/>
<icon height="152" src="resources/ios/icon/[email protected]" width="152"/>
<icon height="29" src="resources/ios/icon/icon-small.png" width="29"/>
<icon height="58" src="resources/ios/icon/[email protected]" width="58"/>
<icon height="87" src="resources/ios/icon/[email protected]" width="87"/>
<icon src="icons/ios/pearl.png"/>
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640"/>
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750"/>
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242"/>
Expand Down
60 changes: 47 additions & 13 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
// General.
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var browserify = require('browserify');
var watchify = require('watchify');
var watch = require('gulp-watch');

// Utils.
var sh = require('shelljs');
var replace = require('replace');
var gutil = require('gulp-util');
var rename = require('gulp-rename');
var flatten = require('gulp-flatten');

// Bower.
var bower = require('bower');
var concat = require('gulp-concat');

// Browserify.
var browserify = require('browserify');
var watchify = require('watchify');

// Sass.
var sass = require('gulp-sass');
var postcss = require('gulp-postcss');
var autoprefixer = require('autoprefixer-core');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var sh = require('shelljs');

var paths = {
sass: ['./scss/**/*.scss']
};

gulp.task('default', ['sass', 'watch', 'watchify']);
gulp.task('default', ['sass', 'watch', 'watchify', 'templates']);

// FIXME: This doesn't work.
// gulp.task('browserify', function () {
// return gulp.src('./www/app/app.m.js')
// .pipe(browserify())
// .pipe(rename('bundle.js'))
// .pipe(gulp.dest('./dist'));
// });
//Moves all templates into a flat structure.
gulp.task('templates', function() {
var source = 'www/app';
var destination = 'www/_templates';
gulp.src(source + '/**/*.t.html', {base: source})
.pipe(watch(source, {base: source}))
.pipe(flatten())
.pipe(gulp.dest(destination));
});

gulp.task('watchify', function() {

Expand All @@ -50,6 +63,27 @@ gulp.task('watchify', function() {
return rebundle();
});

var replaceFiles = ['./www/app/bundle.js'];
gulp.task('add-proxy', function() {
return replace({
regex: "https://cors.api.com/api",
replacement: "https://localhost:8100/api",
paths: replaceFiles,
recursive: false,
silent: false,
});
});

gulp.task('remove-proxy', function() {
return replace({
regex: "https://localhost:8100/api",
replacement: "https://cors.api.com/api",
paths: replaceFiles,
recursive: false,
silent: false,
});
});

gulp.task('sass', function(done) {

var processors = [
Expand Down
Binary file added icons/ios/pearl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/ios/pearl_120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion ionic.project
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,11 @@
"watchPatterns": [
"www/**/*",
"!www/assets/lib/**/*"
],
"proxies": [
{
"path": "/api",
"proxyUrl": "https://openpearl.herokuapp.com"
}
]
}
}
59 changes: 59 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// Karma configuration
// Generated on Sun Jul 05 2015 23:53:35 GMT-0400 (EDT)

module.exports = function(config) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',

// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],

// list of files / patterns to load in the browser
files: [
'./www/assets/lib/angular/angular.js',
'./www/assets/lib/angular-mocks/angular-mocks.js',
// './www/assets/lib/angular-ui-router/release/angular-ui-router.js',
'./www/app/assets/lib/ionic/js/ionic.bundle.js',
'./www/app/bundle.js',
'./spec/**/*spec.js'
],

// list of files to exclude
exclude: [
],

// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],

// web server port
port: 9876,

// enable / disable colors in the output (reporters and logs)
colors: true,

// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,

// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false
})
}
26 changes: 24 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
{
"name": "pearl-client",
"version": "1.0.0",
"description": "Personal health assistant client for the iOS",
"author": "David Zhu <[email protected]>",
"repository": {
"type": "git",
"url": "https://github.com/openpearl/PearlClient"
},
"bugs": {
"url": "https://github.com/openpearl/PearlClient/issues"
},
"dependencies": {
"gulp": "^3.5.6",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^1.3.3"
"gulp-sass": "^1.3.3",
"replace": "^0.3.0"
},
"devDependencies": {
"autoprefixer-core": "^5.2.0",
"bower": "^1.3.3",
"browserify": "^10.2.3",
"chai": "^3.0.0",
"gulp-debug": "^2.0.1",
"gulp-flatten": "^0.1.0",
"gulp-postcss": "^5.1.8",
"gulp-util": "^2.2.14",
"gulp-watch": "^4.3.2",
"jasmine-core": "^2.3.4",
"karma": "^0.12.37",
"karma-browserify": "^4.2.1",
"karma-jasmine": "^0.3.6",
"karma-phantomjs-launcher": "^0.2.0",
"mocha": "^2.2.5",
"phantomjs": "^1.9.17",
"shelljs": "^0.3.0",
"vinyl-source-stream": "^1.1.0",
"watchify": "^3.2.1"
Expand All @@ -32,5 +53,6 @@
],
"cordovaPlatforms": [
"ios"
]
],
"license": "Apache-2.0"
}
Binary file removed resources/android/icon/drawable-hdpi-icon.png
Binary file not shown.
Binary file removed resources/android/icon/drawable-ldpi-icon.png
Binary file not shown.
Binary file removed resources/android/icon/drawable-mdpi-icon.png
Binary file not shown.
Binary file removed resources/android/icon/drawable-xhdpi-icon.png
Binary file not shown.
Binary file removed resources/android/icon/drawable-xxhdpi-icon.png
Binary file not shown.
Binary file removed resources/android/icon/drawable-xxxhdpi-icon.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed resources/icon.png
Binary file not shown.
Binary file removed resources/ios/icon/icon-40.png
Binary file not shown.
Binary file removed resources/ios/icon/[email protected]
Binary file not shown.
Binary file removed resources/ios/icon/icon-50.png
Binary file not shown.
Binary file removed resources/ios/icon/[email protected]
Binary file not shown.
Binary file removed resources/ios/icon/icon-60.png
Diff not rendered.
Binary file removed resources/ios/icon/[email protected]
Diff not rendered.
Binary file removed resources/ios/icon/[email protected]
Diff not rendered.
Binary file removed resources/ios/icon/icon-72.png
Diff not rendered.
Binary file removed resources/ios/icon/[email protected]
Diff not rendered.
Binary file removed resources/ios/icon/icon-76.png
Diff not rendered.
Binary file removed resources/ios/icon/[email protected]
Diff not rendered.
Binary file removed resources/ios/icon/icon-small.png
Diff not rendered.
Binary file removed resources/ios/icon/[email protected]
Diff not rendered.
Binary file removed resources/ios/icon/[email protected]
Diff not rendered.
Binary file removed resources/ios/icon/icon.png
Diff not rendered.
Binary file removed resources/ios/icon/[email protected]
Diff not rendered.
Binary file removed resources/ios/splash/Default-568h@2x~iphone.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-667h.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-736h.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Landscape-736h.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Landscape@2x~ipad.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Landscape~ipad.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Portrait@2x~ipad.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Portrait~ipad.png
Diff not rendered.
Binary file removed resources/ios/splash/Default@2x~iphone.png
Diff not rendered.
Binary file removed resources/ios/splash/Default~iphone.png
Diff not rendered.
Binary file removed resources/splash.png
Diff not rendered.
29 changes: 14 additions & 15 deletions scss/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ body {
}

.pane {
background-color: black;
background: linear-gradient($light, $sky);
background-color: $light_background;
}

.nav-upper-padding {
Expand All @@ -27,21 +26,21 @@ body {
height: 100%;
}

.list {
padding: 10px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
label.item {
border: 0px;
}

// FIXME: Horribly hard-coded styling for logging in.
& > * {
width: 100%;
padding: 0;
}
.padding-container {
padding: 0 10px;
}

.item-input {
padding: 0 10px;
}

label.item {
border: 0px;
.vertical-center {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
Loading

0 comments on commit dcccea7

Please sign in to comment.