Running Grunt with options
Hi,
I need to run a Grunt task with different options via View -> Tools Window -> Grunt. So far I can run the default task but did not work out so far how to provide options. On commandline I am calling grunt --scope=min Is it possible to also provide such option when running the default task from PHPStorm´s Grunt Tool Window? How? I did not suceed with Node options. If yes which is the exact syntax to use?
请先登录再写评论。
What options would you like to pass namely?
To specify custom CMD options (retrieved via grunt.option()) passed to Grunt task, use Tasks field, like: 'print --echo=Hello', where:
Does not work for me. The tasks field does not accept an option string. Cold you please send a screenshot?
And yes. I want to pass the option --scope=min which is then used via grunt.option. This works from the command line but not if called from the Grunt tasks window in PHPStorm
Attachment(s):
s1.jpg
Not sure what you mean dsaying that it doesn't accept it - it's just a simple text field that accepts any input.

Heere is a screenshot:
Now it works for me. The problem was that if y
ou right click on the default task in the Grunt pane and choose "Edit default setting" always autmoatically a new run/debug configuration is created and if you don´t look very close you don´t recognize it and it seems that the option is not save. Also you can´t run the configuration on right click from there. You need to do it via the dropwdown in the navigation bar....Maybe something to improve
A run configuration with "Tasks" value that differs from a clicked task name can't be reused to run/edit the clicked task.... So this is by design