Skip to content

Commit

Permalink
Fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
haringsrob committed Jul 20, 2022
1 parent 1af703f commit 3a0fb07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 0 additions & 6 deletions frontend/js/store/modules/repeaters.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@ const actions = {
const duplicates = {}
repeaterIds.forEach(repeaterId => (duplicates[repeaterId.replace(block.id, id)] = [...repeaters[repeaterId]]))

// Go over the nested repeaters.
repeaterIds.forEach(function (repeaterId) {
const nestedRepeaters = { ...getters.repeatersByBlockId(repeaterId) }
console.log(nestedRepeaters)
})

// copy fields and give them a new id
const fieldCopies = []
Object.keys(duplicates).forEach(duplicateId => {
Expand Down
13 changes: 11 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ const svgConfig = (suffix = null) => {
}
}

let plugins = [
const plugins = [
new CleanWebpackPlugin(),
new SVGSpritemapPlugin(`${srcDirectory}/icons/**/*.svg`, svgConfig()),
new SVGSpritemapPlugin(`${srcDirectory}/icons-custom/**/*.svg`, svgConfig('custom')),
new SVGSpritemapPlugin(`${srcDirectory}/icons-files/**/*.svg`, svgConfig('files')),
new SVGSpritemapPlugin(`${srcDirectory}/icons-wysiwyg/**/*.svg`, svgConfig('wysiwyg')),
new WebpackAssetsManifest({
Expand All @@ -87,6 +86,16 @@ let plugins = [
})
]

function isDirEmpty(dirname) {
return fs.promises.readdir(dirname).then(files => {
return files.length === 0;
});
}

if (!isDirEmpty(`${srcDirectory}/icons-custom/`)) {
plugins.push(new SVGSpritemapPlugin(`${srcDirectory}/icons-custom/**/*.svg`, svgConfig('custom')));
}

if (!isProd) {
plugins.push(new WebpackNotifierPlugin({
title: 'Twill',
Expand Down

0 comments on commit 3a0fb07

Please sign in to comment.