Closed Soviut closed 10 years ago
You should be able to do this using the ext option.
includereplace: {
dist: {
src: "app.js",
dest: "<% yeoman.appScripts %>",
expand: true,
cwd: "<% yeoman.appScripts %>",
ext: ".min.js"
}
}
I forgot about ext! This would probably be a good example to put in the documentation since there may be others like me looking to process a single file this way.
In the long term, it would be really nice if the files object approach were supported since it's far simpler.
I've tried and tried but I can't seem to get the dest to be anything but a directory. I'd really like to be able to select a single file, replace a few variables in it, and then output it to a new file in the same directory. I don't want to overwrite the old file so I need to be able to provide a destination file name, however every attempt I've made has resulted in new directories being created instead.
Even the grunt files object method doesn't work:
(Yes, I'm calling my destination file
.min.js
because I need to call it something different and I plan to minify it immediately afterwards anyways)