Created
December 11, 2014 21:11
-
-
Save lukearmstrong/d8817fb6f3122583c7b8 to your computer and use it in GitHub Desktop.
Sass seemed a bit slow, so just out of curiosity I tried using Less instead.
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
@import '../../../bower_components/bootstrap/less/bootstrap.less'; |
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
@import '../../../bower_components/bootstrap-sass-official/assets/stylesheets/_bootstrap.scss'; |
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
luke@samsung:/var/www/test$ time gulp less | |
[20:58:56] Using gulpfile /var/www/test/gulpfile.js | |
[20:58:56] Starting 'less'... | |
[20:58:56] Finished 'less' after 41 ms | |
[20:58:59] gulp-notify: [Gulp notification] less task complete | |
real 0m11.752s | |
user 0m11.244s | |
sys 0m0.599s |
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
luke@samsung:/var/www/test$ time gulp sass | |
[20:58:29] Using gulpfile /var/www/test/gulpfile.js | |
[20:58:29] Starting 'sass'... | |
[20:58:29] Finished 'sass' after 46 ms | |
[20:58:30] gulp-ruby-sass: directory | |
[20:58:41] gulp-ruby-sass: write app.css | |
write app.css.map | |
[20:58:42] gulp-notify: [Gulp notification] sass task complete | |
[20:58:42] gulp-notify: [Gulp notification] sass task complete | |
real 0m21.199s | |
user 0m20.381s | |
sys 0m0.744s |
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
var gulp = require('gulp'), | |
less = require('gulp-less'), | |
sass = require('gulp-ruby-sass'), | |
minifycss = require('gulp-minify-css'), | |
rename = require('gulp-rename'), | |
notify = require('gulp-notify'); | |
/* | |
Convert SASS to CSS and minify. | |
*/ | |
gulp.task('sass', function() { | |
gulp.src('resources/assets/sass/app.scss') | |
.pipe(sass()) | |
.pipe(gulp.dest('public/css')) | |
.pipe(rename({suffix: '.min'})) | |
.pipe(minifycss()) | |
.pipe(gulp.dest('public/css')) | |
.pipe(notify({ message: 'sass task complete' })); | |
}); | |
/* | |
Convert LESS to CSS and minify. | |
*/ | |
gulp.task('less', function () { | |
gulp.src('resources/assets/less/app.less') | |
.pipe(less({})) | |
.pipe(gulp.dest('public/less')) | |
.pipe(rename({suffix: '.min'})) | |
.pipe(minifycss()) | |
.pipe(gulp.dest('public/less')) | |
.pipe(notify({ message: 'less task complete' })); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment