Skip to content

Instantly share code, notes, and snippets.

@larvanitis
Last active December 17, 2015 09:29
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save larvanitis/5587834 to your computer and use it in GitHub Desktop.
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/
<?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>
@malotur
Copy link

malotur commented Sep 4, 2013

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>
....

@pablote
Copy link

pablote commented Aug 5, 2014

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