Skip to content

Commit

Permalink
merge files from steroids seed
Browse files Browse the repository at this point in the history
  • Loading branch information
DallanQ committed Jan 23, 2014
1 parent 7512b6a commit 9798bac
Show file tree
Hide file tree
Showing 28 changed files with 3,064 additions and 24 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "www/components"
}
13 changes: 13 additions & 0 deletions .cordova/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#Steroids compatibility with Cordova CLI

The `.cordova` folder is included in new Steroids projects for initial [Cordova CLI](https://github.com/apache/cordova-cli) compatibility.

Cordova CLI commands can thus be run inside a Steroids project. The support is not complete; the current main use case is to facilitate plugin development in Xcode/Eclipse without having to create a separate Cordova project. You shouldn't use the native iOS/Android projects for actual development, since Steroids.js features are unavailable there.

Note that you have to load `cordova.js` from the `www/` root in Cordova projects, instead of via `localhost` as it is in Steroids:

```
<script src="cordova.js"></script>
```

The hooks in the `hooks/` folder only affect Cordova CLI commands. For Steroids pre- and post-make hooks, see `config/application.coffee`.
2 changes: 1 addition & 1 deletion .cordova/config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"com.ionicframework.starter","name":"StarterApp"}
{"id":"com.ionicframework.appgyverstarter","name":"IonicAngularAppGyverSeed"}
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.keystore
*.sw*
platforms/^.*
.DS_Store
/dist
node_modules
16 changes: 16 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Default Gruntfile for AppGyver Steroids
* http://www.appgyver.com
*
* Licensed under the MIT license.
*/

'use strict';

module.exports = function(grunt) {

grunt.loadNpmTasks("grunt-steroids");

grunt.registerTask("default", ["steroids-make", "steroids-compile-sass"]);

};
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ionic-angular-cordova-seed
ionic-angular-appgyver-seed
==========================

The perfect starting point for an Ionic project.
The perfect starting point for an Ionic + AppGyver project.

- [Ionic Tutorials](http://ionicframework.com/tutorials/)
- [Ionic Tutorials](http://ionicframework.com/tutorials/)
- [AppGyver Tutorials](http://academy.appgyver.com/courses/steroids)
17 changes: 17 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "ionic-angular-appgyver-seed",
"version": "0.0.1",
"authors": [
],
"ignore": [
"**/.*",
"node_modules",
"www/components",
"www/spec",
"test",
"tests"
],
"dependencies": {
"steroids-js": "3.1.x"
}
}
58 changes: 58 additions & 0 deletions config/application.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# For an explanation of the steroids.config properties, see the guide at
# http://guides.appgyver.com/steroids/guides/project_configuration/config-application-coffee/

steroids.config.name = "ionic-angular-appgyver-seed"

# -- Initial Location --
steroids.config.location = "http://localhost/index.html"

# -- Tab Bar --
# steroids.config.tabBar.enabled = true
# steroids.config.tabBar.tabs = [
# {
# title: "Index"
# icon: "icons/[email protected]"
# location: "http://localhost/index.html"
# },
# {
# title: "Internet"
# icon: "icons/[email protected]"
# location: "http://www.google.com"
# }
# ]

# steroids.config.tabBar.tintColor = "#000000"
# steroids.config.tabBar.tabTitleColor = "#00aeef"
# steroids.config.tabBar.selectedTabTintColor = "#ffffff"
# steroids.config.tabBar.selectedTabBackgroundImage = "icons/[email protected]"

# steroids.config.tabBar.backgroundImage = ""

# -- Navigation Bar --
steroids.config.navigationBar.tintColor = "#00aeef"
steroids.config.navigationBar.titleColor = "#ffffff"
steroids.config.navigationBar.buttonTintColor = "#ffffff"
steroids.config.navigationBar.buttonTitleColor = "#ffffff"

# steroids.config.navigationBar.landscape.backgroundImage = ""
# steroids.config.navigationBar.portrait.backgroundImage = ""

# -- Android Loading Screen
steroids.config.loadingScreen.tintColor = "#262626"

# -- iOS Status Bar --
steroids.config.statusBar.enabled = true
steroids.config.statusBar.style = "default"

# -- File Watcher --
# steroids.config.watch.exclude = ["www/my_excluded_file.js", "www/my_excluded_dir"]

# -- Pre- and Post-Make hooks --
# steroids.config.hooks.preMake.cmd = "echo"
# steroids.config.hooks.preMake.args = ["running yeoman"]
# steroids.config.hooks.postMake.cmd = "echo"
# steroids.config.hooks.postMake.args = ["cleaning up files"]

# -- Default Editor --
# steroids.config.editor.cmd = "subl"
# steroids.config.editor.args = ["."]
12 changes: 12 additions & 0 deletions merges/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Use the `merges` directory just like you would in a vanilla Cordova project.

Example structure:
`<your app dir>/merges/android/index.html`
`<your app dir>/merges/ios/index.html`

This will generate `dist/index.android.html` (android) and `dist/index.html` (ios) files during Steroids `make`.
Read more about the `.android.` extension here: http://guides.appgyver.com/steroids/guides/android/android-extension/

Merge files will overwrite existing files when building to the `dist` directory.

For example: `www/index.html` would be overwritten by `merges/ios/index.html` and `www/index.android.html` would be overwritten by `merges/android/index.html`.
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "mySteroidsProject",
"version": "0.0.1",
"description": "My awesome AppGyver Steroids project.",
"repository": "N/A",
"readme":"N/A",
"private": true,
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"devDependencies": {
"grunt-steroids": "0.x"
},
"license": "none",
"engines": {
"steroids": "3.1.9"
}
}
2 changes: 2 additions & 0 deletions platforms/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*
# Except this file
!.gitignore
# and README.md
!README.md
8 changes: 8 additions & 0 deletions platforms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The `platforms/` folder houses native Android and iOS Cordova projects, added with the

```
$ cordova platform add <platform_name>
```

command. See `.cordova/readme.md` for more information about Cordova CLI compatibility with Steroids.
2 changes: 2 additions & 0 deletions plugins/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*
# Except this file
!.gitignore
# and README.md
!README.md
3 changes: 3 additions & 0 deletions plugins/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Unlike in vanilla Cordova projects, custom plugins are configured in the cloud: http://guides.appgyver.com/steroids/guides/cloud_services/plugin-config/

For a list of plugins included with AppGyver Scanner, see the GitHub repo at https://github.com/AppGyver/steroids-plugins
16 changes: 16 additions & 0 deletions www/config.android.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.ionicframework.appgyverstarter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>IonicAngularAppGyverSeed</name>
<description>
A sample Ionic Framework app using AppGyver and AngularJS
</description>
<author email="[email protected]" href="http://ionicframework.com">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
</widget>
29 changes: 29 additions & 0 deletions www/config.ios.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.ionicframework.appgyverstarter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>IonicAngularAppGyverSeed</name>
<description>
A sample Ionic Framework app using AppGyver and AngularJS
</description>
<author email="[email protected]" href="http://ionicframework.com">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />

<!-- preferences copied from AppGyver - are they necessary? -->
<preference name="AllowInlineMediaPlayback" value="false" />
<!-- <preference name="DisallowOverscroll" value="false" /> -->
<preference name="EnableViewportScale" value="false" />
<preference name="HideKeyboardFormAccessoryBar" value="false" />
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
<preference name="KeyboardShrinksView" value="false" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="PaginationMode" value="unpaginated"/>
<preference name="PageLength" value="0"/>
<preference name="PaginationBreakingMode" value="page"/>
<preference name="GapBetweenPages" value="0"/>
</widget>
43 changes: 43 additions & 0 deletions www/config.tizen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/myapp" version="1.0.0" viewmodes="maximized">

<!--
# Change your package id to a string which matches the following criteria:
# - exactly 10 characters
# - characters may consist of upper and lower case letters and numbers.
#
# Package id must be unique in the context of Tizen Application Store.
# Application id must begin with your package id.
#
# For example: id="abcDE12345.MySteroidsApp" package="abcDE12345"
#
-->
<tizen:application id="ChangeThis.MySteroidsApp" package="ChangeThis" required_version="2.2"/>

<content src="index.html"/>
<icon src="img/ionic.png"/>
<name>My Steroids App</name>

<feature name="http://tizen.org/feature/screen.size.normal.720.1280"/>

<tizen:privilege name="http://tizen.org/privilege/application.launch"/>
<tizen:privilege name="http://tizen.org/privilege/contact.read"/>
<tizen:privilege name="http://tizen.org/privilege/contact.write"/>
<tizen:privilege name="http://tizen.org/privilege/filesystem.read"/>
<tizen:privilege name="http://tizen.org/privilege/filesystem.write"/>
<tizen:privilege name="http://tizen.org/privilege/unlimitedstorage"/>
<tizen:privilege name="http://tizen.org/privilege/setting"/>
<tizen:privilege name="http://tizen.org/privilege/package.info"/>
<tizen:privilege name="http://tizen.org/privilege/notification"/>
<tizen:privilege name="http://tizen.org/privilege/system"/>
<tizen:privilege name="http://tizen.org/privilege/content"/>
<tizen:privilege name="http://tizen.org/privilege/content.read"/>
<tizen:privilege name="http://tizen.org/privilege/content.write"/>
<tizen:privilege name="http://tizen.org/privilege/mediacapture"/>

<tizen:setting screen-orientation="auto-rotation" context-menu="enable" background-support="enable" encryption="disable" install-location="auto" hwkey-event="enable"/>
<tizen:allow-navigation>*</tizen:allow-navigation>
<tizen:content-security-policy>default-src *; script-src 'unsafe-inline' *;</tizen:content-security-policy>
<access origin="*" subdomains="true"></access>

</widget>
18 changes: 4 additions & 14 deletions www/config.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
<!-- Required for Cordova CLI commands to work. Use config.android.xml and config.ios.xml` to set up your Steroids app. -->

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.ionicframework.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>StarterApp</name>
<description>
A sample Ionic Framework app using Cordova and AngularJS
</description>
<author email="[email protected]" href="http://ionicframework.com">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<widget id="io.cordova.hellocordova" version="2.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloCordova</name>
</widget>
9 changes: 6 additions & 3 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>Ionic Seed App</title>
<title>Ionic Angular AppGyver Seed App</title>

<!-- ionic css -->
<link href="lib/css/ionic.css" rel="stylesheet">

<!-- your app's css -->
<link href="css/app.css" rel="stylesheet">
<script src="js/onerror.js"></script>
<script src="js/console.log.js"></script>

<!-- angularjs scripts -->
<script src="lib/js/ionic.js"></script>
Expand All @@ -19,8 +21,9 @@
<script src="lib/js/angular-ui/angular-ui-router.js"></script>
<script src="lib/js/ionic-angular.js"></script>

<!-- cordova script -->
<script src="cordova.js"></script>
<!-- cordova.js is served from localhost to ensure the correct version -->
<script src="http://localhost/cordova.js"></script>
<script src="lib/js/steroids-js/steroids.js"></script>

<!-- your app's script -->
<script src="js/app.js"></script>
Expand Down
1 change: 1 addition & 0 deletions www/js/console.log.android.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// no need to override in android
37 changes: 37 additions & 0 deletions www/js/console.log.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// When using iOS simulator, the first console.log messages might not appear before Cordova has overridden the console.log
// Here we buffer the messages and output when override is done.

(function(window) {

var logMessages = [];

var defaultConsoleLog = window.console.log;

window.console.log = function(args) {
logMessages.push(args);
}

var bufferConsoleLogUntilReadyAndFlush = function() {
var cordovaOverride = "logWithArgs";
var isNative = "[native code]";

if ( (defaultConsoleLog.toString().indexOf(cordovaOverride) > -1) ||
(defaultConsoleLog.toString().indexOf(isNative) > -1) ) {
window.console.log = defaultConsoleLog;
for (var i=0; i<logMessages.length; i++) {
console.log(logMessages.pop());
}

} else {

window.setTimeout(function() {
bufferConsoleLogUntilReadyAndFlush();
}, 100);

}

}

bufferConsoleLogUntilReadyAndFlush();

})(window);
1 change: 1 addition & 0 deletions www/js/onerror.android.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// onError suspended in Android before content-type is sent back correctly
Loading

0 comments on commit 9798bac

Please sign in to comment.