From c0ad010daa66e08d3a68b2822cb685f6e0abe557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Tue, 2 Oct 2018 02:57:06 +0200 Subject: [PATCH] SASS --- static/style.css => client/style/style.scss | 0 gulpfile.js | 11 ++++++++++- package.json | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) rename static/style.css => client/style/style.scss (100%) diff --git a/static/style.css b/client/style/style.scss similarity index 100% rename from static/style.css rename to client/style/style.scss diff --git a/gulpfile.js b/gulpfile.js index f05c2ae..8f8bf0d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,6 +4,7 @@ var merge = require('merge-stream'); var gulp = require('gulp'); var sourcemaps = require('gulp-sourcemaps'); var coffee = require('gulp-coffee'); +var sass = require('gulp-sass'); var pug = require('gulp-pug'); var insert = require('gulp-insert'); var uglify = require('gulp-uglify-es').default; @@ -12,6 +13,7 @@ var concat = require('gulp-concat'); var paths = { lib: 'client/lib/*.js', coffee: 'client/scripts', + styles: 'client/style/*.scss', pug: 'client/pug/*.pug', dest: 'static', maps: 'maps' @@ -51,10 +53,17 @@ gulp.task('coffee', function(){ return merge(tasks); }); +gulp.task('styles', function(){ + return gulp.src(paths.styles) + .pipe(concat('style.css')) + .pipe(sass()) + .pipe(gulp.dest(paths.dest)) +}); + gulp.task('pug', function(){ return gulp.src(paths.pug) .pipe(pug()) .pipe(gulp.dest(paths.dest)) }); -gulp.task('default', [ 'lib', 'coffee', 'pug' ]); +gulp.task('default', [ 'lib', 'coffee', 'styles', 'pug' ]); diff --git a/package.json b/package.json index 996ae44..0344a61 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "gulp": "*", "gulp-sourcemaps": "*", "gulp-pug": "*", + "gulp-sass": "*", "gulp-coffee": "*", "gulp-insert": "*", "gulp-uglify-es": "*",