Skip to content
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ src/**.js.map
!demo/public/css
coverage/*
*.map
_obsolete.scss
_obsolete.scss
15 changes: 14 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var through2 = require('through2');
// result filename "icons.svg" is the name of base directory of the first file.
var iconsource = ['src/scss/icons/*.svg', '!src/scss/icons/icons.svg']

gulp.task('svgstore', function () {
gulp.task('svgstore', function() {
return gulp
.src(iconsource)
.pipe(rename({prefix: 'svg-'}))
Expand Down Expand Up @@ -45,6 +45,19 @@ gulp.task('svgstore', function () {
.pipe(gulp.dest('src/scss/icons'));
});

/**
* Copy thirdparty CSS modules from node_modules into a thirdparty folder
* this way we can @import and build them into the themes without the need to run `npm i` in CUI
* this was a problem because in CI we don't want to install CUI dev dependencies when building the webfrontend
*/
gulp.task('thirdparty', function() {
return gulp.src([
'node_modules/leaflet/dist/**/*.+(css|png)',
'node_modules/leaflet-defaulticon-compatibility/dist/**/*.+(css|png)',
], { base: 'node_modules/' })
.pipe(gulp.dest('src/scss/thirdparty'));
});

gulp.task('default', function(){
gulp.watch(iconsource, ['svgstore']);
});
17,749 changes: 1,548 additions & 16,201 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"version": "1.7.1",
"description": "Coffeescript User Interface System",
"scripts": {
"build": "npm run rmdist && npm run svg && webpack --progress --env development=true",
"build:production": "npm run rmdist && npm run svg && webpack --progress --env production=true",
"build": "npm run rmdist && npm run gulp && webpack --progress --env development=true",
"build:production": "npm run rmdist && npm run gulp && webpack --progress --env production=true",
"build:watch": "npm run rmdist && webpack --watch --progress",
"build:all": "npm run rmdist && npm run svg && webpack --progress --env development=true --env all=true && webpack --progress --env production=true --env all=true",
"build:all": "npm run rmdist && npm run gulp && webpack --progress --env development=true --env all=true && webpack --progress --env production=true --env all=true",
"build:min": "npm run build:production",
"build:docs": "node_modules/coffee-script/bin/coffee GenerateDocs.coffee",
"test": "jest",
"rmdist": "rimraf public/*",
"svg": "gulp svgstore"
"gulp": "gulp svgstore thirdparty"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -59,13 +59,15 @@
"html-loader": "^0.5.1",
"jest": "^21.2.1",
"leaflet": "^1.7.1",
"leaflet-defaulticon-compatibility": "^0.1.2",
"less": "^2.7.2",
"load-google-maps-api": "^1.3.3",
"marked": "^0.7.0",
"mini-css-extract-plugin": "^2.7.5",
"moment": "^2.29.1",
"postcss-loader": "^3.0.0",
"raw-loader": "^4.0.2",
"resolve-url-loader": "^5.0.0",
"rimraf": "^3.0.2",
"sass": "1.60.0",
"sass-loader": "10.0.5",
Expand Down
Loading