1.0.1 • Published 9 years ago

grunt-redacter v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

grunt-redacter

Grunt plugin for selectively removing chunks of javascript or HTML source code.

Installing

npm install grunt-redacter --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile like any other plugin:

grunt.loadNpmTasks('grunt-redacter');

Usage

The plugin will run through specified source files and remove any text between the specified comment strings.

Example

redacter: {
  options: {
    js: {
      start: '//+r',
      end: '//-r'
    },
    html: {
      start: '<!-- +r -->',
      end: '<!-- -r -->'
    }
  },
  your-task: { 
    files: {
      expand: true,
      cwd: '.tmp/scripts',
      src: ['*.js'],
      dest: 'dist/public/scripts'
    }
  },
  your-other-task: {
    files: {
      expand: true,
      cwd: 'dist/public',
      src: ['*.html', 'views/{,*/}*.html', '/templates/{,*}*.html'],
      dest: 'dist/public'
    }
  }
},
1.0.1

9 years ago

1.0.0

9 years ago