First Commit
This commit is contained in:
commit
feb864dc47
170 changed files with 4671 additions and 0 deletions
56
hackatonApp/gulp-tasks/default.js
Normal file
56
hackatonApp/gulp-tasks/default.js
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
var gulp = require('gulp');
|
||||
var gutil = require('gulp-util');
|
||||
var bower = require('bower');
|
||||
var sass = require('gulp-sass');
|
||||
var sh = require('shelljs');
|
||||
|
||||
var sourcemaps = require('gulp-sourcemaps');
|
||||
var templateCache = require('gulp-angular-templatecache');
|
||||
|
||||
var paths = {
|
||||
sass: ['./scss/**/*.scss'],
|
||||
templatecache: ['./www/views/**/*.html']
|
||||
};
|
||||
|
||||
gulp.task('sass', function(done) {
|
||||
gulp.src('./scss/ionic.app.scss')
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(sass({
|
||||
errLogToConsole: true
|
||||
}))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest('./www/css/'))
|
||||
.on('end', done);
|
||||
});
|
||||
|
||||
gulp.task('templatecache', function (done) {
|
||||
gulp.src(paths.templatecache)
|
||||
.pipe(templateCache({standalone:true, filename:'views.js', module:'your_app_name.views', root:'views/'}))
|
||||
.pipe(gulp.dest('./www/js/'))
|
||||
.on('end', done);
|
||||
});
|
||||
|
||||
gulp.task('watch', function() {
|
||||
gulp.watch(paths.sass, ['sass']);
|
||||
gulp.watch(paths.templatecache, ['templatecache']);
|
||||
});
|
||||
|
||||
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();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue