major: flatten the project

This commit is contained in:
Jean-Baptiste Pasquier
2020-11-26 23:21:55 +01:00
parent ebe46c6b6f
commit dee070596a
66 changed files with 11228 additions and 9483 deletions

21
internal/assets.js Normal file
View File

@ -0,0 +1,21 @@
const HTMLAsset = require('parcel-bundler/lib/assets/HTMLAsset')
function shouldIgnore (file) {
// Ignore img(src="${...}") on pug & keep the components folder pristine
return /\${.+}/.test(file) || /components/.test(file);
}
class SkipStartinbloxWidgetAsset extends HTMLAsset {
addDependency (name, opts) {
if (!shouldIgnore(opts.resolved)) {
return super.addDependency(name, opts)
}
}
processSingleDependency (p, opts) {
if (shouldIgnore(p)) return p
else return super.processSingleDependency(p, opts)
}
}
module.exports = SkipStartinbloxWidgetAsset