copy files for CDN and update the time stamps

  • copy file from directory a to b, rename files with stamps
  • the stamps of files are like name.{%s date}-{%s md5}.extname
  • update script tags in the HTML file

Download via NPM:

npm install --save deploy-with-md5 like this:

module.exports = (grunt) ->
  options =
          'test/dest/': 'test/src/*'
        html: [
  grunt.initConfig options
  grunt.task.loadTasks 'tasks'
  grunt.registerTask 'test'['deploy-with-md5:demo']

You may also read to see how I use it.

This plugin renames file from test/src/ to test/dest with md5 and timestamps. Also it will update the MD5 string in the given HTML files.

This plugin is not will tested. Be sure to know Grunt when you want to use this plugin.

The logic of dealing with HTML updating and old file cleaning is not robust.
This part is supposed to be buggy at the moment :(