Skip to content

Instantly share code, notes, and snippets.

@fracz
Last active March 24, 2017 08:20
Show Gist options
  • Save fracz/dfe3ad75b3b9c04e3481a2f296a18115 to your computer and use it in GitHub Desktop.
Save fracz/dfe3ad75b3b9c04e3481a2f296a18115 to your computer and use it in GitHub Desktop.
Coffeescript Angular templates for IntelliJ IDEA
<template name="aw" value="@org.springframework.beans.factory.annotation.Autowired&#10;private $CLASS_NAME$ $FIELD_NAME$;" description="Adds @Autowired field" toReformat="true" toShortenFQNames="true">
<variable name="CLASS_NAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="FIELD_NAME" expression="" defaultValue="decapitalize(CLASS_NAME)" alwaysStopAt="true" />
<context>
<option name="JAVA_DECLARATION" value="true" />
</context>
</template>
<template name="cl" value="console.log($END$);" description="console.log" toReformat="false" toShortenFQNames="true">
<context>
<option name="CoffeeScript" value="true" />
<option name="JAVA_SCRIPT" value="true" />
<option name="TypeScript" value="true" />
</context>
</template>
<template name="comp" value="angular.module('ewida').component '$COMPONENT_NAME$',&#10; templateUrl: '$PATH$$FILENAME$.html'&#10; controller: class&#10; constructor: () -&gt;&#10;&#10; $onInit: =&gt;&#10; $END$&#10;" description="New component" toReformat="true" toShortenFQNames="true">
<variable name="COMPONENT_NAME" expression="" defaultValue="decapitalize(camelCase(groovyScript(&quot;_1.replaceAll(\&quot;-\&quot;,\&quot;_\&quot;)&quot;, fileNameWithoutExtension())))" alwaysStopAt="false" />
<variable name="PATH" expression="" defaultValue="groovyScript(&quot;_editor.getVirtualFile().getPath().replace(_editor.getProject().getBaseDir().getPath(), \&quot;\&quot;).replace(_editor.getVirtualFile().getName(), \&quot;\&quot;).replace(\&quot;/src/EWIDA/Frontend/\&quot;, \&quot;\&quot;)&quot;)" alwaysStopAt="false" />
<variable name="FILENAME" expression="" defaultValue="groovyScript(&quot;_1.replaceAll(\&quot;_\&quot;,\&quot;-\&quot;)&quot;, snakeCase(decapitalize(COMPONENT_NAME))" alwaysStopAt="false" />
<context>
<option name="CoffeeScript" value="true" />
</context>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment