Add support for dynamic themes

This commit is contained in:
Art Lowel
2021-02-25 15:04:32 +01:00
parent 70dac6bc8f
commit 5a6e4b1278
224 changed files with 3429 additions and 1017 deletions

View File

@@ -1,22 +0,0 @@
const syncBuildDir = require('copyfiles');
const path = require('path');
const {
projectRoot,
theme,
themePath,
} = require('../webpack/helpers');
const projectDepth = projectRoot('./').split(path.sep).length;
let callback;
if (theme !== null && theme !== undefined) {
callback = () => {
syncBuildDir([path.join(themePath, '**/*'), 'build'], { up: projectDepth + 2 }, () => {})
}
}
else {
callback = () => {};
}
syncBuildDir([projectRoot('src/**/*'), 'build'], { up: projectDepth + 1 }, callback);