Skip to content

make brunch can replace keywords of public files after every time complied

Notifications You must be signed in to change notification settings

bogdanteodoru/keyword-brunch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keyword-brunch

make brunch replace keywords of public files after every time complied

Usage

Add `"keyword-brunch": "x.y.z"` to `package.json` of your brunch app.

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

About

make brunch can replace keywords of public files after every time complied

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 61.4%
  • JavaScript 38.6%