Last active
March 25, 2025 10:39
-
-
Save larvanitis/5587834 to your computer and use it in GitHub Desktop.
Webstorm / IDEA :: External Tools :: Yeoman angular:* generators (w/o --coffee or --minsafe) Installation: drop in ~/.WebStorm6/config/tools/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<toolSet name="Yeoman[ng]"> | |
<tool name="Create Route" description="Generates a controller and view, and configures a route in app/scripts/app.js connecting them." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="yo" /> | |
<option name="PARAMETERS" value="angular:route $Prompt$" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
</tool> | |
<tool name="Create Controller" description="Generates a controller in app/scripts/controllers." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="yo" /> | |
<option name="PARAMETERS" value="angular:controller $Prompt$" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
</tool> | |
<tool name="Create Directive" description="Generates a directive in app/scripts/directives." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="yo" /> | |
<option name="PARAMETERS" value="angular:directive $Prompt$" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
</tool> | |
<tool name="Create Filter" description="Generates a filter in app/scripts/filters." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="yo" /> | |
<option name="PARAMETERS" value="angular:filter $Prompt$" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
</tool> | |
<tool name="Create View" description="Generates an HTML view file in app/views." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="yo" /> | |
<option name="PARAMETERS" value="angular:view $Prompt$" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
</tool> | |
<tool name="Create Service[f]" description="Generates an AngularJS service (factory)." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="yo" /> | |
<option name="PARAMETERS" value="angular:service $Prompt$ factory" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
</tool> | |
<tool name="Create Service[s]" description="Generates an AngularJS service (service)." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="yo" /> | |
<option name="PARAMETERS" value="angular:service $Prompt$ service" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
</tool> | |
<tool name="Create Service[v]" description="Generates an AngularJS service (value)." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="yo" /> | |
<option name="PARAMETERS" value="angular:service $Prompt$ value" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
</tool> | |
<tool name="Create Service[c]" description="Generates an AngularJS service (constant)." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="yo" /> | |
<option name="PARAMETERS" value="angular:service $Prompt$ constant" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
</tool> | |
</toolSet> |
none of these work.
i get this:
Cannot run program "yo" (in directory "C:\Users\jharasimo\WebstormProjects\untitled"): CreateProcess error=2, The system cannot find the file specified
each time... yet if i just use cmd to go to that dir it works fine...
Thanks.
Great job, just a little note:
- windows users have to replace the command "yo" with "yo.cmd"
ex. - the new syntax for service and the new "decorator" service (also added the --minsafe options) can be implemented as:
....
<tool name="Create Decorator" description="Generates an Angular service decorator." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="yo.cmd" />
<option name="PARAMETERS" value="angular:decorator $Prompt$ --minsafe" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="Create Service[f]" description="Generates an AngularJS service (factory)." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="yo.cmd" />
<option name="PARAMETERS" value="angular:factory $Prompt$ --minsafe" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="Create Service[s]" description="Generates an AngularJS service (service)." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="yo.cmd" />
<option name="PARAMETERS" value="angular:service $Prompt$ --minsafe" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="Create Service[v]" description="Generates an AngularJS service (value)." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="yo.cmd" />
<option name="PARAMETERS" value="angular:value $Prompt$ --minsafe" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="Create Service[p]" description="Generates an AngularJS service (provider)." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="yo.cmd" />
<option name="PARAMETERS" value="angular:provider $Prompt$ --minsafe" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="Create Service[c]" description="Generates an AngularJS service (constant)." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="yo.cmd" />
<option name="PARAMETERS" value="angular:constant $Prompt$ --minsafe" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
....
Anyone knows if this file can be on a project .idea folder somehow? instead of the user home? I would really like to version this file, as to avoid other developers having to create the external tool themselves.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How is the path for node set? I get this error:
env: node: No such file or directory
The syntax for service have changed
eg yo angular:value
https://github.com/yeoman/generator-angular#service
Thank you.