diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-09-21 12:49:18 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-09-21 12:49:18 -0400 |
| commit | b28028ac4082842143b0f528d6bc539da6ccb419 (patch) | |
| tree | 1e26ea969a781ed8e323fca4e3c76345113fc694 /gulpfile.js | |
| parent | 676270d21beed31d767a06c89522198c77d5d865 (diff) | |
mega changes, including updates and X
Diffstat (limited to 'gulpfile.js')
| -rw-r--r-- | gulpfile.js | 42 |
1 files changed, 36 insertions, 6 deletions
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']); + }); |
