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 e95c0e7
Show file tree
Hide file tree
Showing 5 changed files with 345 additions and 7 deletions.
18 changes: 17 additions & 1 deletion webapp/sources/rudder/rudder-web/src/main/gulpfile.js
Expand Up @@ -9,12 +9,18 @@ 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/**/*',
'dest': 'webapp/style/',
},
'scss': {
'src': 'style/rudder/scss/**/*',
'dest': 'webapp/style/rudder/scss/',
},
'js': {
'src': 'javascript/**/*.js',
'dest': 'webapp/javascript/',
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.scss.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 e95c0e7

Please sign in to comment.