Skip to content

Instantly share code, notes, and snippets.

@codeb2cc
Created March 18, 2013 05:21
Show Gist options
  • Save codeb2cc/5185230 to your computer and use it in GitHub Desktop.
Save codeb2cc/5185230 to your computer and use it in GitHub Desktop.
Strip version/min filename in grunt-contrib-copy task.
// In task configuration, use `expand: true` and `rename: stripVersion`
var stripVersion = function (dest, src) {
var path = require('path');
return path.join(dest, src.replace(/-\d+\.\d+\.\d+(\.min)?/, ''))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment