Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelGauthier committed Oct 11, 2023
1 parent 9dc0f46 commit a27a01a
Show file tree
Hide file tree
Showing 8 changed files with 355 additions and 9 deletions.
20 changes: 18 additions & 2 deletions webapp/sources/rudder/rudder-web/src/main/gulpfile.js
Expand Up @@ -9,10 +9,16 @@ const elm_p = require('gulp-elm');
const merge = require('merge-stream');
const del = require('del');
const through = require('through2');
const sass = require('gulp-sass')(require('sass'));
const sourcemaps = require('gulp-sourcemaps');

const paths = {
'css': {
'src': 'style/**/*',
'src': 'style/libs/*',
'dest': 'webapp/style/',
},
'scss': {
'src': 'style/rudder/*',
'dest': 'webapp/style/',
},
'js': {
Expand Down Expand Up @@ -138,12 +144,22 @@ function vendor_css(cb) {
cb();
};

function scss(cb) {
src(paths.scss.src)
.pipe(sourcemaps.init())
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(sourcemaps.write())
.pipe(dest(paths.css.dest));
cb();
};

exports.elm = series(clean, elm)
exports.watch = series(clean, function() {
watch(paths.elm.watch, { ignoreInitial: false }, elm);
watch(paths.js.src, { ignoreInitial: false }, js);
watch(paths.css.src, { ignoreInitial: false }, css);
watch(paths.scss.src, { ignoreInitial: false }, scss);
watch(paths.vendor_js.src, { ignoreInitial: false }, vendor_js);
watch(paths.vendor_css.src, { ignoreInitial: false }, vendor_css);
});
exports.default = series(clean, parallel(elm, css, js, vendor_css, vendor_js));
exports.default = series(clean, parallel(elm, css, scss, js, vendor_css, vendor_js));

0 comments on commit a27a01a

Please sign in to comment.