bezoerb / gruntfile-api

API to programmatically modify a gruntfile
8 stars 2 forks source link

Is it possible to have a remove task feature in upcoming releases? #8

Closed mtpultz closed 10 years ago

mtpultz commented 10 years ago

I'd like to be able to run a config task only once on setup then have it removed. It will assist with workflow of project setup, but if invoked twice it will possibly overwrite files that have been worked on.

Just a thought, Cheers

bezoerb commented 10 years ago

@mtpultz Just got a PR #7 for this feature. There is still some work to do but i think it's possible to address this for an upcoming release

bezoerb commented 10 years ago

@mtpultz Why don't you just write some custom task and add a check if it's running the first time?

mtpultz commented 10 years ago

@bezoerb I thought of that, but couldn't figure out where I would set a flag permanently to prevent it being used again. I ended creating a task that receives a parameter (key), which was so ridiculously long (hash) that no one would ever type it. It is only invoked and passed the key proper from a bash script that runs on post_install of grunt, and is mixed in with some folder checking. It's the best I could come up with so far. I haven't been using grunt that long.