Created
March 11, 2016 09:58
-
-
Save imrvelj/d6834919a429e3b15b23 to your computer and use it in GitHub Desktop.
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
Open terminal => CTRL+ALT+T | |
Make a folder for your project | |
1. mkdir project | |
2. cd project | |
3. npm init | |
=> fill out all the needed stuff; name, description, whatever | |
4. npm i -D gulp gulp-sass | |
=> waiting | |
5. make two folders, one for your source code, one for your 'built' code that gulp creates | |
=> /project | |
- build | |
- src | |
6. goto src folder and make index.html and css folder | |
7. In terminal: touch gulpfile.js => creates a gulpfile.js | |
8. open gulpfile.js with whatever text-editor. For example: atom gulpfile.js | |
9. Inside | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
// compiles sass to css and copies it into build/css folder | |
gulp.task('styles', function() { | |
gulp.src('./src/css/*.sass') | |
.pipe(sass()) | |
.pipe(gulp.dest('./build'); | |
}); | |
// copies index.html from src to build | |
gulp.task('html', function(){ | |
gulp.src('./src/index.html) | |
.pipe(gulp.dest('./build'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment