Created
December 28, 2017 06:59
-
-
Save abruzzi/952265296517b94236af6469f5bb3f91 to your computer and use it in GitHub Desktop.
This file contains hidden or 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'); | |
| var sass = require('gulp-ruby-sass'); | |
| var browserSync = require('browser-sync'); | |
| var reload = browserSync.reload; | |
| gulp.task('sass', function() { | |
| return sass('app/scss/main.scss') | |
| .pipe(gulp.dest('app/css')) | |
| .pipe(reload({ stream:true })); | |
| }); | |
| gulp.task('serve', ['sass'], function() { | |
| browserSync({ | |
| server: { | |
| baseDir: 'app' | |
| } | |
| }); | |
| gulp.watch('app/scss/*.scss', ['sass']); | |
| gulp.watch("app/index.html").on('change', browserSync.reload); | |
| }); |
This file contains hidden or 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": "frontend-template", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "dependencies": { | |
| "browser-sync": "^2.18.13" | |
| }, | |
| "devDependencies": { | |
| "gulp": "^3.9.1", | |
| "gulp-ruby-sass": "^2.1.1" | |
| }, | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "keywords": [], | |
| "author": "", | |
| "license": "ISC" | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gulp works with
sass-3.5.5