Skip to content

Instantly share code, notes, and snippets.

@sebastianwahn
Created December 30, 2017 15:23
Show Gist options
  • Save sebastianwahn/2deaf1f3dca07dfdf93cc10a79b04f3d to your computer and use it in GitHub Desktop.
Save sebastianwahn/2deaf1f3dca07dfdf93cc10a79b04f3d to your computer and use it in GitHub Desktop.
IntelliJ File template for NestJS (debug)
#set($parts=$NAME.split('\.') )
#set($rawClassName=$parts.get(0))
// ${rawClassName}
#set($firstRawClassNameLetter=$parts.get(0).charAt(0).toString())
// ${firstRawClassNameLetter}
#set($firstClassNameLetter=$parts.get(0).charAt(0).toString().toUpperCase())
// ${firstClassNameLetter}
#set($rawTypeName=$parts.get(1))
// ${rawTypeName}
#set($firstRawTypeNameLetter=$parts.get(1).charAt(0).toString())
// ${firstRawTypeNameLetter}
#set($firstTypeNameLetter=$parts.get(1).charAt(0).toString().toUpperCase())
// ${firstTypeNameLetter}
#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