Created
December 30, 2017 15:24
-
-
Save sebastianwahn/03dee056f94c5e61f627b75b301b8c07 to your computer and use it in GitHub Desktop.
IntelliJ File template for NestJS
This file contains hidden or 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
#set($parts=$NAME.split('\.') ) | |
#set($rawClassName=$parts.get(0)) | |
#set($firstRawClassNameLetter=$parts.get(0).charAt(0).toString()) | |
#set($firstClassNameLetter=$parts.get(0).charAt(0).toString().toUpperCase()) | |
#set($rawTypeName=$parts.get(1)) | |
#set($firstRawTypeNameLetter=$parts.get(1).charAt(0).toString()) | |
#set($firstTypeNameLetter=$parts.get(1).charAt(0).toString().toUpperCase()) | |
#set($className=$parts.get(0).replaceFirst($firstRawClassNameLetter, $firstClassNameLetter)) | |
#set($typeName=$parts.get(1).replaceFirst($firstRawTypeNameLetter, $firstTypeNameLetter)) | |
import { Component } from '@nestjs/common'; | |
export class ${className}${typeName} { | |
/** | |
* ${className}${typeName} class constructor | |
*/ | |
constructor() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Import this file template into IntelliJ/PHPStorm/WebStorm and create a file called "some.controller", this template will create a TypeScript class called "SomeController".
Add/Edit/Remove other TypeScript specific things (imports, extends, interface, ..) as you like.