From b28028ac4082842143b0f528d6bc539da6ccb419 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Thu, 21 Sep 2017 12:49:18 -0400 Subject: mega changes, including updates and X --- gulpfile.js | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) (limited to 'gulpfile.js') diff --git a/gulpfile.js b/gulpfile.js index a73233c6..4bd6933c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,20 +1,25 @@ 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' })) @@ -22,6 +27,31 @@ gulp.task('sass', function(done) { .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']); + }); -- cgit v1.2.3