gulp-tsfmt
A gulp plugin for formatting TypeScript files.
Installation
npm install gulp-tsfmt
TypeScript Version
gulp-tsfmt
doesn't have own depency on TypeScript. You are expected to npm install typescript
your own version. It's currently testes with version 1.7.5
.
Usage
The snippet below formats and replaces in place each TypeScript file.
; gulp
You can also use gulp-changed-in-place plugin to prevent reformatting all files when only once changes.
;; gulp
Options
Here are the default values and available configuration options:
IndentSize: 2TabSize: 2NewLineCharacter: "\n"ConvertTabsToSpaces: trueInsertSpaceAfterCommaDelimiter: trueInsertSpaceAfterSemicolonInForStatements: trueInsertSpaceBeforeAndAfterBinaryOperators: trueInsertSpaceAfterKeywordsInControlFlowStatements: trueInsertSpaceAfterFunctionKeywordForAnonymousFunctions: falseInsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: falsePlaceOpenBraceOnNewLineForFunctions: falsePlaceOpenBraceOnNewLineForControlBlocks: false
License
MIT