Skip to content

Commit

Permalink
fix(build): variables in @site.variables were ignored
Browse files Browse the repository at this point in the history
If the component uses the default theme, any changes to site.variables in @{themesFolder}/@{site}/globals/site.variables are ignored.

Additionally site.variables now trigger a rebuild.

Closes
#1003
  • Loading branch information
ColinFrick authored and lubber-de committed Nov 12, 2019
1 parent f0ba553 commit 4d3f3e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
@import (optional) "@{themesFolder}/@{site}/globals/site.variables";

/* Component's site.variables */
@import (optional) "@{themesFolder}/@{theme}/globals/site.variables";
& when not (@theme = 'default') {
@import (optional) "@{themesFolder}/@{theme}/globals/site.variables";
}

/* Site theme site.variables */
@import (optional) "@{siteFolder}/globals/site.variables";
Expand Down
3 changes: 2 additions & 1 deletion tasks/build/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ module.exports.watch = function (type, config) {
// Watch theme.config file
gulp.watch([
normalize(config.paths.source.config),
normalize(config.paths.source.site + '/**/site.variables')
normalize(config.paths.source.site + '/**/site.variables'),
normalize(config.paths.source.themes + '/**/site.variables')
])
.on('all', function () {
// Clear timeout and reset files
Expand Down

0 comments on commit 4d3f3e4

Please sign in to comment.