Skip to content

Commit

Permalink
gulp updates to support native layout.scss in sass build
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Jan 21, 2020
1 parent 467a97c commit 018371b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 173 deletions.
22 changes: 22 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,28 @@ function install(done) {
.pipe(gulp.dest(config.dist.assets + key + '/dist'));
gulp.src('node_modules/' + key + '/scss/**/*')
.pipe(gulp.dest(config.dist.assets + key + '/scss'));
} else if (key == 'select2-bootstrap4-theme') {
// select2-bootstrap4-theme is special and need to copy dist and src
// modify src/layout.scss in order for sass build to work by removing:
// @import "~bootstrap/scss/functions";
// @import "~bootstrap/scss/variables";
// @import "~bootstrap/scss/mixins";
gulp.src('node_modules/' + key + '/dist/**/*')
.pipe(gulp.dest(config.dist.assets + key + '/dist'));
gulp.src('node_modules/' + key + '/src/**/*')
.pipe(gulp.dest(config.dist.assets + key + '/src'))
.on('end', function() {
replace({
files: config.dist.assets + key + '/src/layout.scss',
from:
[
/@import "~bootstrap\/scss\/functions";/,
/@import "~bootstrap\/scss\/variables";/,
/@import "~bootstrap\/scss\/mixins";/
],
to: '',
});
});
} else if (fs.existsSync('node_modules/' + key + '/dist')) {
// only copy dist directory, if it exists
gulp.src('node_modules/' + key + '/dist/**/*')
Expand Down
2 changes: 1 addition & 1 deletion interface/themes/core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $enable-responsive-font-sizes: true;
// Import Bootstrap 4 SCSS Files before doing anything
@import "../../public/assets/bootstrap/scss/bootstrap";
// Import Select2 BS4 Theme
@import "select2-bootstrap-theme";
@import "../../public/assets/select2-bootstrap4-theme/src/layout.scss";

@import "directional";

Expand Down
172 changes: 0 additions & 172 deletions interface/themes/select2-bootstrap-theme.scss

This file was deleted.

0 comments on commit 018371b

Please sign in to comment.