Gulp + Sass + Livereload
This commit is contained in:
parent
bba9109c82
commit
5ca6115ed5
4
.bowerrc
4
.bowerrc
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"directory": "fmartingrcom/themes/v1/static/bower"
|
||||
}
|
||||
"directory": "fmartingrcom/static/bower_components"
|
||||
}
|
|
@ -10,4 +10,11 @@ local_settings.py
|
|||
*~
|
||||
|
||||
# OS X
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
|
||||
# utilities
|
||||
/fmartingrcom/static/bower_components
|
||||
/node_modules
|
||||
|
||||
# css
|
||||
/fmartingrcom/static/css
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "fmartingrcom",
|
||||
"description": "fmartingr.com",
|
||||
"main": "gulpfile.js",
|
||||
"authors": [
|
||||
"Felipe Martin"
|
||||
],
|
||||
"license": "GPLv2",
|
||||
"moduleType": [],
|
||||
"homepage": "",
|
||||
"private": true,
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"fmartingrcom/static/bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
'use strict';
|
||||
|
||||
var gulp = require('gulp');
|
||||
|
||||
// Styles
|
||||
var sass = require('gulp-sass');
|
||||
var concatCss = require('gulp-concat-css');
|
||||
var merge = require('merge-stream');
|
||||
var minifyCss = require('gulp-minify-css');
|
||||
var livereload = require('gulp-livereload');
|
||||
|
||||
gulp.task('sass', function () {
|
||||
var sassStream = gulp.src('./fmartingrcom/static/sass/style.scss')
|
||||
.pipe(sass().on('error', sass.logError))
|
||||
var bowerStream = gulp.src([
|
||||
|
||||
])
|
||||
|
||||
return merge(bowerStream, sassStream)
|
||||
.pipe(concatCss("style.css"))
|
||||
.pipe(minifyCss())
|
||||
.pipe(gulp.dest('./fmartingrcom/static/css'))
|
||||
.pipe(livereload());
|
||||
});
|
||||
|
||||
gulp.task('livereload', function () {
|
||||
return gulp.src('./fmartingrcom/templates/**/*.html').pipe(livereload());
|
||||
});
|
||||
|
||||
gulp.task('sass:watch', function () {
|
||||
livereload.listen();
|
||||
gulp.watch('./fmartingrcom/static/sass/**/*.scss', ['sass']);
|
||||
gulp.watch('./fmartingrcom/templates/**/*.html', ['livereload']);
|
||||
});
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "fmartingrcom",
|
||||
"version": "3.0.0",
|
||||
"description": "fmartingr.com",
|
||||
"main": "gulpfile.js",
|
||||
"devDependencies": {
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-livereload": "^3.8.1",
|
||||
"gulp-minify-css": "^1.2.2",
|
||||
"gulp-sass": "^2.0.4",
|
||||
"merge-stream": "^1.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/fmartingr/fmartingr.com.git"
|
||||
},
|
||||
"author": "Felipe Martin",
|
||||
"license": "GPLv2"
|
||||
}
|
Loading…
Reference in New Issue