Closed gberger closed 6 years ago
I would recommend the custom function for now. I'll keep this open while I evaluate the expected behavior.
I've run into this problem too. What about an option:
rename(<fn|obj>, { multiExt: true })
This should then start the extension at the first dot in the filename rather than the last.
Alternatively, counterparts of the available options/fields:
rename({ suffixL: '-v2.0.1' }) // does what gberger wants
rename(function (fileObj) {
console.log(fileObj.basename , fileObj.extname ); // 'abc.min', '.js'
console.log(fileObj.basenameL, fileObj.extnameL); // 'abc', '.min.js'
})
I'm not sure which solution is nicer.
Perhaps an extFirstDot
boolean option, which defaults to false for back-compat.
Had the same issues for my "*.js.map" files.
Please add extDot
option such as in Grunt: http://gruntjs.com/configuring-tasks
I expected it to be abc-v2.0.1.min.js.
Is there an easy way to do this, or would I need to use a custom function?