make brunch replace keywords of public files after every time complied
Pick a plugin version that corresponds to your minor (y) brunch version.
If you want to use git version of plugin, add
"keyword-brunch": "git+ssh://[email protected]:bolasblack/keyword-brunch.git"
.
Usage:
module.exports =
keyword:
# file filter
filePattern: /\.(js|css|html)$/
# Extra files, add brunch didn't process file here,
# will not filter by `filePattern`
extraFiles: [
"public/humans.txt"
]
# Now keyword-brunch has these keyword:
# {!version!}, {!name!}, {!date!}, {!timestamp!}
# read information from package.json
map:
"{!version!}": processer
plugin will do:
fileContent = fileContent.replace RegExp("{!version!}", "g"), processer