Skip to content
Permalink
Browse files

Upload missing files

  • Loading branch information...
Nicolas Ritz Nicolas Ritz
Nicolas Ritz authored and Nicolas Ritz committed Feb 14, 2017
1 parent 305e269 commit 66093555dff9533e0808f16e7e9dbb7902f2f6e9
Showing 437 changed files with 217,407 additions and 3 deletions.
@@ -0,0 +1,7 @@
{
"name": "Minc",
"description": "The heartbeat of your company",
"repository": "",
"logo": "http://ionicframework.com/img/ionic-logo-blog.png",
"keywords": ["ionic", "static"]
}
@@ -0,0 +1,15 @@
{
"name": "Minc",
"private": "true",
"devDependencies": {
"ionic": "driftyco/ionic-bower#1.2.4",
"platform.js": "platform#~1.3.1",
"ionic-platform-web-client": "^0.7.1",
"ionic-service-core": "^0.1.10"
},
"dependencies": {
"ionic-service-core": "^0.1.10",
"ionic-filter-bar": "^1.1.1",
"angular-deckgrid": "^0.5.0"
}
}
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="co.minc.app" version="1.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap="http://phonegap.com/ns/1.0">
<name>Minc</name>
<description>
The heartbeat of your company
</description>
<author>
Nicolas Ritz
</author>
<content src="index.html"/>
<!-- <access origin="*"/> -->
<access origin="http://*.cloudinary.com" />
<access origin="https://*.cloudinary.com" />
<access origin="http://*.firebaseio.com" />
<access origin="https://*.firebaseio.com" />
<access origin="http://*.ionicframework.com" />
<access origin="https://*.ionicframework.com" />
<access origin="http://*.firebase.com" />
<access origin="https://*.firebase.com" />
<access origin="https://*.google-analytics.com" />
<access origin="content://*"/>
<access origin="file:///*"/>
<access origin="filesystem://*"/>
<access origin="cdvfile://*"/>
<allow-navigation href="*"/>
<!-- <allow-navigation href="file:///**/*"/>
<allow-navigation href="filesystem://**/*"/>
<allow-navigation href="cdvfile://**/*"/>
<allow-navigation href="mailto:*"/> -->
<allow-intent href="mailto:*" />
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="3000"/>
<preference name="AutoHideSplashScreen" value="false"/>
<preference name="orientation" value="portrait"/>
<platform name="android">
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
</platform>
<platform name="ios">
<preference name="deployment-target" value="7.0"/>
<preference name="KeyboardDisplayRequiresUserAction" value="false"/>
<icon src="resources/ios/icon/icon.png" width="57" height="57"/>
<icon src="resources/ios/icon/icon@2x.png" width="114" height="114"/>
<icon src="resources/ios/icon/icon-40.png" width="40" height="40"/>
<icon src="resources/ios/icon/icon-40@2x.png" width="80" height="80"/>
<icon src="resources/ios/icon/icon-50.png" width="50" height="50"/>
<icon src="resources/ios/icon/icon-50@2x.png" width="100" height="100"/>
<icon src="resources/ios/icon/icon-60.png" width="60" height="60"/>
<icon src="resources/ios/icon/icon-60@2x.png" width="120" height="120"/>
<icon src="resources/ios/icon/icon-60@3x.png" width="180" height="180"/>
<icon src="resources/ios/icon/icon-72.png" width="72" height="72"/>
<icon src="resources/ios/icon/icon-72@2x.png" width="144" height="144"/>
<icon src="resources/ios/icon/icon-76.png" width="76" height="76"/>
<icon src="resources/ios/icon/icon-76@2x.png" width="152" height="152"/>
<icon src="resources/ios/icon/icon-small.png" width="29" height="29"/>
<icon src="resources/ios/icon/icon-small@2x.png" width="58" height="58"/>
<icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87"/>
<splash src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/>
<splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/>
<splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/>
<splash src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
<splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
<splash src="resources/ios/splash/Default@2x~iphone.png" width="640" height="960"/>
<splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/>
</platform>
<icon src="resources/android/icon/drawable-xhdpi-icon.png"/>
<plugin name="cordova-plugin-google-analytics" spec="~0.8.1"/>
</widget>
@@ -0,0 +1,9 @@
{
"firebase": "glaring-fire-1308",
"public": "www",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
@@ -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();
});
@@ -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);
});
});
@@ -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));
@@ -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));
@@ -0,0 +1,94 @@
#!/usr/bin/env node

// Add Platform Class
// v1.0
// Automatically adds the platform class to the body tag
// after the `prepare` command. By placing the platform CSS classes
// directly in the HTML built for the platform, it speeds up
// rendering the correct layout/style for the specific platform
// instead of waiting for the JS to figure out the correct classes.

var fs = require('fs');
var path = require('path');

var rootdir = process.argv[2];

function addPlatformBodyTag(indexPath, platform) {
// add the platform class to the body tag
try {
var platformClass = 'platform-' + platform;
var cordovaClass = 'platform-cordova platform-webview';

var html = fs.readFileSync(indexPath, 'utf8');

var bodyTag = findBodyTag(html);
if(!bodyTag) return; // no opening body tag, something's wrong

if(bodyTag.indexOf(platformClass) > -1) return; // already added

var newBodyTag = bodyTag;

var classAttr = findClassAttr(bodyTag);
if(classAttr) {
// body tag has existing class attribute, add the classname
var endingQuote = classAttr.substring(classAttr.length-1);
var newClassAttr = classAttr.substring(0, classAttr.length-1);
newClassAttr += ' ' + platformClass + ' ' + cordovaClass + endingQuote;
newBodyTag = bodyTag.replace(classAttr, newClassAttr);

} else {
// add class attribute to the body tag
newBodyTag = bodyTag.replace('>', ' class="' + platformClass + ' ' + cordovaClass + '">');
}

html = html.replace(bodyTag, newBodyTag);

fs.writeFileSync(indexPath, html, 'utf8');

process.stdout.write('add to body class: ' + platformClass + '\n');
} catch(e) {
process.stdout.write(e);
}
}

function findBodyTag(html) {
// get the body tag
try{
return html.match(/<body(?=[\s>])(.*?)>/gi)[0];
}catch(e){}
}

function findClassAttr(bodyTag) {
// get the body tag's class attribute
try{
return bodyTag.match(/ class=["|'](.*?)["|']/gi)[0];
}catch(e){}
}

if (rootdir) {

// go through each of the platform directories that have been prepared
var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);

for(var x=0; x<platforms.length; x++) {
// open up the index.html file at the www root
try {
var platform = platforms[x].trim().toLowerCase();
var indexPath;

if(platform == 'android') {
indexPath = path.join('platforms', platform, 'assets', 'www', 'index.html');
} else {
indexPath = path.join('platforms', platform, 'www', 'index.html');
}

if(fs.existsSync(indexPath)) {
addPlatformBodyTag(indexPath, platform);
}

} catch(e) {
process.stdout.write(e);
}
}

}
Oops, something went wrong.

0 comments on commit 6609355

Please sign in to comment.
You can’t perform that action at this time.