Skip to content

Instantly share code, notes, and snippets.

@imrvelj
Created March 11, 2016 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imrvelj/d6834919a429e3b15b23 to your computer and use it in GitHub Desktop.
Save imrvelj/d6834919a429e3b15b23 to your computer and use it in GitHub Desktop.
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