Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output File #3

Open
kyleknighted opened this issue Feb 14, 2013 · 5 comments
Open

Output File #3

kyleknighted opened this issue Feb 14, 2013 · 5 comments

Comments

@kyleknighted
Copy link

So, I dug in a bit. It appears to be basically running a sed -i command, replacing the current file with the updates.

Is it possible have an output file so that I can write the file to a different place?

@jharding
Copy link
Owner

Well right now grunt-sed is basically just a wrapper around replace and that only supports in-place edits. What you're asking for is pretty reasonable – I could either swap out the usage of replace with my own custom implementation or I can fork replace and add the functionality there. I'm more inclined to do the latter, assuming this is something @harthur would be ok with.

If you want to take a stab at this go for it, otherwise I don't think I'll have time to work on this until later next week.

@kyleknighted
Copy link
Author

Looks like I could do a grunt.file.copy in the interim. And then run sed on the copied version of the file.

@jharding
Copy link
Owner

Yeah that's not ideal, but it should work. I'll be sure to update this issue when I end up implementing this.

@kyleknighted
Copy link
Author

Seemed to work for the time being. If I end up with spare time I will see if I can do anything, but I'm in the same boat and probably won't be able to get to it for a week.

@kyleknighted
Copy link
Author

Only had a few minutes to spare, but I spent 15 minutes or so getting an output concept started.
https://github.com/idpro/replace/tree/feature/output-file

I'll try and get it integrated a bit better and tests made, but with recent news I won't have much time to deal with it for the next couple weeks. Feel free to tinker or hit me up with some ideas for better implementation (or write it better, yourself) whatever works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants