forked from ZoneMinder/zmNinja
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mega changes, including updates and X
- Loading branch information
1 parent
676270d
commit b28028a
Showing
1,499 changed files
with
345,920 additions
and
13,086 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,57 @@ | ||
var gulp = require('gulp'); | ||
var gutil = require('gulp-util'); | ||
var bower = require('bower'); | ||
var concat = require('gulp-concat'); | ||
var sass = require('gulp-sass'); | ||
var cleanCss = require('gulp-clean-css'); | ||
var minifyCss = require('gulp-minify-css'); | ||
var rename = require('gulp-rename'); | ||
var sh = require('shelljs'); | ||
|
||
var paths = { | ||
sass: ['./scss/**/*.scss'] | ||
sass: ['./scss/**/*.scss'], | ||
}; | ||
|
||
gulp.task('default', ['sass']); | ||
|
||
gulp.task('sass', function(done) { | ||
gulp.src('./scss/ionic.app.scss') | ||
.pipe(sass()) | ||
.on('error', sass.logError) | ||
.pipe(sass({ | ||
errLogToConsole: true | ||
})) | ||
.pipe(gulp.dest('./www/css/')) | ||
.pipe(cleanCss({ | ||
.pipe(minifyCss({ | ||
keepSpecialComments: 0 | ||
})) | ||
.pipe(rename({ extname: '.min.css' })) | ||
.pipe(gulp.dest('./www/css/')) | ||
.on('end', done); | ||
}); | ||
|
||
gulp.task('watch', ['sass'], function() { | ||
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(); | ||
}); | ||
|
||
|
||
gulp.task('watch', function() { | ||
gulp.watch(paths.sass, ['sass']); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* After prepare, files are copied to the platforms/ios and platforms/android folders. | ||
* Lets clean up some of those files that arent needed with this hook. | ||
*/ | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
|
||
var deleteFolderRecursive = function(removePath) { | ||
if( fs.existsSync(removePath) ) { | ||
fs.readdirSync(removePath).forEach(function(file,index){ | ||
var curPath = path.join(removePath, file); | ||
if(fs.lstatSync(curPath).isDirectory()) { // recurse | ||
deleteFolderRecursive(curPath); | ||
} else { // delete file | ||
fs.unlinkSync(curPath); | ||
} | ||
}); | ||
fs.rmdirSync(removePath); | ||
} | ||
}; | ||
|
||
var iosPlatformsDir = path.resolve(__dirname, '../../platforms/ios/www/lib/ionic/scss'); | ||
var androidPlatformsDir = path.resolve(__dirname, '../../platforms/android/assets/www/lib/ionic/scss'); | ||
|
||
deleteFolderRecursive(iosPlatformsDir); | ||
deleteFolderRecursive(androidPlatformsDir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env node | ||
|
||
var fs = require('fs'); | ||
var async = require('async'); | ||
var exec = require('child_process').exec; | ||
var path = require('path'); | ||
|
||
var root = process.argv[2]; | ||
var androidManifest = path.join(root, 'platforms/android/AndroidManifest.xml'); | ||
fs.exists(path.join(root, 'platforms/android'), function(exists) { | ||
if(!exists) return; | ||
fs.readFile(androidManifest, 'utf8', function(err, data) { | ||
if(err) throw err; | ||
|
||
var lines = data.split('\n'); | ||
var searchingFor = '<application android:hardwareAccelerated="true"'; | ||
var newManifest = []; | ||
var largeHeap = 'android:largeHeap="true"'; | ||
lines.forEach(function(line) { | ||
if(line.trim().indexOf(searchingFor) != -1 && line.trim().indexOf(largeHeap) == -1) { | ||
newManifest.push(line.replace(/\>$/, ' ') + largeHeap + ">"); | ||
} else { | ||
newManifest.push(line); | ||
} | ||
}); | ||
|
||
fs.writeFileSync(androidManifest, newManifest.join('\n')); | ||
}); | ||
}); |
Oops, something went wrong.