Last active
October 15, 2015 12:07
-
-
Save alistairtweedie/758582ebbc48229f2072 to your computer and use it in GitHub Desktop.
Gulp for designers - Getting started with Gulp.js : http://insidethe.agency/blog/gulp-for-designers-getting-started-with-gulp-js
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'), | |
sass = require('gulp-sass'), | |
minifyCSS = require('gulp-minify-css'), | |
rename = require('gulp-rename'); | |
gulp.task('sass-to-css-please', function() { | |
return gulp.src('./scss/site.scss') | |
.pipe(sass()) //Concatinate our Sass files into CSS | |
.pipe(minifyCSS()) //Minify the CSS file that is output | |
.pipe(rename('styles.min.css')) //Rename this CSS file | |
.pipe(gulp.dest('./css/')); //Put this CSS in our CSS folder | |
}); | |
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
{ | |
"name": "NewGulpProject", | |
"description": "An example of how you can get started with Gulp.js", | |
"version": "0.0.0", | |
"author": "@alistairtweedie", | |
"devDependencies": { | |
"gulp": "3.9.0", | |
"gulp-minify-css": "1.2.0", | |
"gulp-rename": "1.2.2", | |
"gulp-sass": "2.0.4" | |
} | |
} | |
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
$npm install gulp -g | |
$npm install gulp —save-dev | |
$ npm install gulp-sass gulp-minify-css gulp-rename —save-dev | |
$ gulp sass-to-css-please | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment