1.0.0 • Published 8 years ago

grunt-tagged-replace v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

grunt-tagged-replace

A grunt plugin that replaces pieces of your source using comment tags to identify the location.

It takes code like:

let server = /*server*/ DEVSERVER /*/server*/

And allows you to configure a target like:

grunt.initConfig({
  taggedReplace: {
    dev: {
      tags: [
        {
          server: 'DEVSERVER'
        }
      ]
    },
    prod: {
    tags: [
      {
        server: 'PRODSERVER'
      }
    ]
    }
  }
})

grunt.registerTask('buildprod', ['taggedReplace:prod'])
grunt.registerTask('builddev', ['taggedReplace:dev'])

Then just run: grunt buildprod