jsoverson / grunt-open

Open urls and files from a grunt task
MIT License
109 stars 19 forks source link

Added relative path support for opening files in grunt project folder #15

Closed markhicken closed 5 years ago

markhicken commented 10 years ago

Added node "path" dependency in preparation for relative path support.

Added isRelativePath:boolean option allowing grunt-open to launch files relative to Gruntfile.js.

Use case: User creates a build of their project and wishes to launch the file in Internet Explorer (ugh I know) using the file:// protocol. Setting the relative path to true will cause grunt-open to get the full path to the file allowing it to open properly.

jsoverson commented 10 years ago

Is there a reason this would be better than to have the path.resolve in the grunt config? I'm hesitant to support this because it seems like it would be more transparent to do as part of the configuration instead of requiring a flag and per-task support.