Skip to content

Instantly share code, notes, and snippets.

@imrvelj imrvelj/projectSetup
Created Mar 11, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.