@jbroll/jsx6-build
v0.3.0
Published
Build utility
Readme
filters
During copy task you can transform the copied file content using filters.
config for filter contains
filter- function that transforms and returns new value, but can returnundefinedto say no changes happenedinclude- list of include glob patternsexclude- list of exclude glob patterns
example filter
const changeBg = {
include: ['index.html'],
exclude: [],
filter: str => {
let srch = 'background: #eee;'
if (str.includes(srch)) return str.replace(srch, 'background: blue;')
},
}