-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory": "www/lib" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Specifies intentionally untracked files to ignore when using Git | ||
# http://git-scm.com/docs/gitignore | ||
|
||
node_modules/ | ||
platforms/ | ||
plugins/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# TVList | ||
An ionic app that lets you manage your tv series and movies |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "TVList", | ||
"private": "true", | ||
"devDependencies": { | ||
"ionic": "driftyco/ionic-bower#1.0.0-rc.0" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<widget id="com.ionicframework.todo911311" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
<name>TVList</name> | ||
<description> | ||
An Ionic Framework and Cordova project. | ||
</description> | ||
<author email="hi@ionicframework" href="http://ionicframework.com/"> | ||
Ionic Framework Team | ||
</author> | ||
<content src="index.html"/> | ||
<access origin="*"/> | ||
<preference name="webviewbounce" value="false"/> | ||
<preference name="UIWebViewBounce" value="false"/> | ||
<preference name="DisallowOverscroll" value="true"/> | ||
<preference name="BackupWebStorage" value="none"/> | ||
<feature name="StatusBar"> | ||
<param name="ios-package" value="CDVStatusBar" onload="true"/> | ||
</feature> | ||
</widget> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
var gulp = require('gulp'); | ||
var gutil = require('gulp-util'); | ||
var bower = require('bower'); | ||
var concat = require('gulp-concat'); | ||
var sass = require('gulp-sass'); | ||
var minifyCss = require('gulp-minify-css'); | ||
var rename = require('gulp-rename'); | ||
var sh = require('shelljs'); | ||
|
||
var paths = { | ||
sass: ['./scss/**/*.scss'] | ||
}; | ||
|
||
gulp.task('default', ['sass']); | ||
|
||
gulp.task('sass', function(done) { | ||
gulp.src('./scss/ionic.app.scss') | ||
.pipe(sass()) | ||
.pipe(gulp.dest('./www/css/')) | ||
.pipe(minifyCss({ | ||
keepSpecialComments: 0 | ||
})) | ||
.pipe(rename({ extname: '.min.css' })) | ||
.pipe(gulp.dest('./www/css/')) | ||
.on('end', done); | ||
}); | ||
|
||
gulp.task('watch', function() { | ||
gulp.watch(paths.sass, ['sass']); | ||
}); | ||
|
||
gulp.task('install', ['git-check'], function() { | ||
return bower.commands.install() | ||
.on('log', function(data) { | ||
gutil.log('bower', gutil.colors.cyan(data.id), data.message); | ||
}); | ||
}); | ||
|
||
gulp.task('git-check', function(done) { | ||
if (!sh.which('git')) { | ||
console.log( | ||
' ' + gutil.colors.red('Git is not installed.'), | ||
'\n Git, the version control system, is required to download Ionic.', | ||
'\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.', | ||
'\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.' | ||
); | ||
process.exit(1); | ||
} | ||
done(); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<!-- | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
--> | ||
# Cordova Hooks | ||
|
||
This directory may contain scripts used to customize cordova commands. This | ||
directory used to exist at `.cordova/hooks`, but has now been moved to the | ||
project root. Any scripts you add to these directories will be executed before | ||
and after the commands corresponding to the directory name. Useful for | ||
integrating your own build systems or integrating with version control systems. | ||
|
||
__Remember__: Make your scripts executable. | ||
|
||
## Hook Directories | ||
The following subdirectories will be used for hooks: | ||
|
||
after_build/ | ||
after_compile/ | ||
after_docs/ | ||
after_emulate/ | ||
after_platform_add/ | ||
after_platform_rm/ | ||
after_platform_ls/ | ||
after_plugin_add/ | ||
after_plugin_ls/ | ||
after_plugin_rm/ | ||
after_plugin_search/ | ||
after_prepare/ | ||
after_run/ | ||
after_serve/ | ||
before_build/ | ||
before_compile/ | ||
before_docs/ | ||
before_emulate/ | ||
before_platform_add/ | ||
before_platform_rm/ | ||
before_platform_ls/ | ||
before_plugin_add/ | ||
before_plugin_ls/ | ||
before_plugin_rm/ | ||
before_plugin_search/ | ||
before_prepare/ | ||
before_run/ | ||
before_serve/ | ||
pre_package/ <-- Windows 8 and Windows Phone only. | ||
|
||
## Script Interface | ||
|
||
All scripts are run from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables: | ||
|
||
* CORDOVA_VERSION - The version of the Cordova-CLI. | ||
* CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios). | ||
* CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer) | ||
* CORDOVA_HOOK - Path to the hook that is being executed. | ||
* CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate) | ||
|
||
If a script returns a non-zero exit code, then the parent cordova command will be aborted. | ||
|
||
|
||
## Writing hooks | ||
|
||
We highly recommend writting your hooks using Node.js so that they are | ||
cross-platform. Some good examples are shown here: | ||
|
||
[http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* Install all plugins listed in package.json | ||
* https://raw.githubusercontent.com/diegonetto/generator-ionic/master/templates/hooks/after_platform_add/install_plugins.js | ||
*/ | ||
var exec = require('child_process').exec; | ||
var path = require('path'); | ||
var sys = require('sys'); | ||
|
||
var packageJSON = null; | ||
|
||
try { | ||
packageJSON = require('../../package.json'); | ||
} catch(ex) { | ||
console.log('\nThere was an error fetching your package.json file.') | ||
console.log('\nPlease ensure a valid package.json is in the root of this project\n') | ||
return; | ||
} | ||
|
||
var cmd = process.platform === 'win32' ? 'cordova.cmd' : 'cordova'; | ||
// var script = path.resolve(__dirname, '../../node_modules/cordova/bin', cmd); | ||
|
||
packageJSON.cordovaPlugins = packageJSON.cordovaPlugins || []; | ||
packageJSON.cordovaPlugins.forEach(function (plugin) { | ||
exec('cordova plugin add ' + plugin, function (error, stdout, stderr) { | ||
sys.puts(stdout); | ||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* Push plugins to cordovaPlugins array after_plugin_add | ||
*/ | ||
var fs = require('fs'), | ||
packageJSON = require('../../package.json'), | ||
path = require('path'); | ||
|
||
packageJSON.cordovaPlugins = packageJSON.cordovaPlugins || []; | ||
process.env.CORDOVA_PLUGINS.split(',').forEach(function (plugin) { | ||
var configString, | ||
idRegEx, | ||
id, | ||
pluginXmlPath, | ||
pluginToAdd; | ||
|
||
if(plugin.indexOf('https') != -1 || plugin.indexOf('git') != -1) { | ||
console.log('Installing plugin from url'); | ||
} | ||
|
||
if(plugin.indexOf('/') != -1) { | ||
try { | ||
pluginXmlPath = path.resolve(plugin, 'plugin.xml'); | ||
console.log('got pluginXmlPath:', pluginXmlPath); | ||
if (!fs.existsSync(pluginXmlPath)) { | ||
var errorMessage = ['There was no plugin.xml file found for path: ', pluginXmlPath].join(''); | ||
return; | ||
} | ||
|
||
configString = fs.readFileSync(pluginXmlPath,{encoding: 'utf8'}); | ||
idRegEx = new RegExp('<plugin[^>]*id="(.*)"', 'i'); | ||
id = idRegEx.exec(configString)[1] | ||
pluginToAdd = {id: id, locator: plugin}; | ||
} catch(ex) { | ||
console.log('There was an error retrieving the plugin.xml filr from the 010_register_plugin.js hook', ex); | ||
} | ||
} else { | ||
pluginToAdd = plugin; | ||
} | ||
|
||
if(typeof pluginToAdd == 'string' && packageJSON.cordovaPlugins.indexOf(pluginToAdd) == -1) { | ||
packageJSON.cordovaPlugins.push(pluginToAdd); | ||
} else if (typeof pluginToAdd == 'object') { | ||
var pluginExists = false; | ||
packageJSON.cordovaPlugins.forEach(function(checkPlugin) { | ||
if(typeof checkPlugin == 'object' && checkPlugin.id == pluginToAdd.id) { | ||
pluginExists = true; | ||
} | ||
}) | ||
if(!pluginExists) { | ||
packageJSON.cordovaPlugins.push(pluginToAdd); | ||
} | ||
} | ||
}); | ||
|
||
fs.writeFileSync('package.json', JSON.stringify(packageJSON, null, 2)); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* Remove plugins from cordovaPlugins array after_plugin_rm | ||
*/ | ||
var fs = require('fs'); | ||
var packageJSON = require('../../package.json'); | ||
|
||
packageJSON.cordovaPlugins = packageJSON.cordovaPlugins || []; | ||
|
||
process.env.CORDOVA_PLUGINS.split(',').forEach(function (plugin) { | ||
var index = packageJSON.cordovaPlugins.indexOf(plugin); | ||
if (index > -1) { | ||
packageJSON.cordovaPlugins.splice(index, 1); | ||
} else { | ||
//If it didnt find a match, it may be listed as {id,locator} | ||
for(var i = 0, j = packageJSON.cordovaPlugins.length; i < j; i++) { | ||
var packagePlugin = packageJSON.cordovaPlugins[i]; | ||
if(typeof packagePlugin == 'object' && packagePlugin.id == plugin) { | ||
packageJSON.cordovaPlugins.splice(index, 1); | ||
break; | ||
} | ||
} | ||
} | ||
}); | ||
|
||
fs.writeFile('package.json', JSON.stringify(packageJSON, null, 2)); |