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 0818c13
Show file tree
Hide file tree
Showing 80 changed files with 529 additions and 164 deletions.
28 changes: 24 additions & 4 deletions webapp/sources/rudder/rudder-web/src/main/gulpfile.js
Expand Up @@ -9,15 +9,24 @@ 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/**/*',
'style/login.css'
],
'dest': 'webapp/style/',
},
'scss': {
'src': 'style/rudder/**/*',
'dest': 'webapp/style/rudder',
},
'js': {
'src': 'javascript/**/*.js',
'dest': 'webapp/javascript/',
'dest': 'webapp/javascript',
},
'vendor_js': {
'src': [
Expand Down Expand Up @@ -60,7 +69,7 @@ var grep = function(regex) {
}

function clean(cb) {
del.sync([paths.js.dest, paths.css.dest]);
del.sync([paths.js.dest, paths.css.dest, paths.scss.dest]);
cb();
}

Expand Down Expand Up @@ -128,6 +137,7 @@ function css(cb) {
cb();
};


function vendor_css(cb) {
src(paths.vendor_css.src)
// flatten file hierarchy
Expand All @@ -138,12 +148,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 0818c13

Please sign in to comment.