Package com.diffplug.gradle.spotless
Class TypescriptExtension
- java.lang.Object
-
- com.diffplug.gradle.spotless.FormatExtension
-
- com.diffplug.gradle.spotless.TypescriptExtension
-
public class TypescriptExtension extends FormatExtension
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classTypescriptExtension.TypescriptFormatExtensionclassTypescriptExtension.TypescriptPrettierConfigOverrides the parser to be set to typescript, no matter what the user's config says.-
Nested classes/interfaces inherited from class com.diffplug.gradle.spotless.FormatExtension
FormatExtension.ClangFormatConfig, FormatExtension.EclipseWtpConfig, FormatExtension.LicenseHeaderConfig, FormatExtension.NpmStepConfig<T extends FormatExtension.NpmStepConfig<?>>, FormatExtension.PrettierConfig
-
-
Field Summary
-
Fields inherited from class com.diffplug.gradle.spotless.FormatExtension
steps, target, targetExclude
-
-
Constructor Summary
Constructors Constructor Description TypescriptExtension(SpotlessExtension spotless)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormatExtension.PrettierConfigprettier()Uses the default version of prettier.FormatExtension.PrettierConfigprettier(String version)Uses the specified version of prettier.FormatExtension.PrettierConfigprettier(Map<String,String> devDependencies)Uses exactly the npm packages specified in the map.protected voidsetupTask(SpotlessTask task)Sets up a format task according to the values in this extension.TypescriptExtension.TypescriptFormatExtensiontsfmt()Uses the default version of typescript-format.TypescriptExtension.TypescriptFormatExtensiontsfmt(String version)Uses the specified version of typescript-format.TypescriptExtension.TypescriptFormatExtensiontsfmt(Map<String,String> devDependencies)Creates aTypescriptFormatExtensionusing exactly the specified npm packages.-
Methods inherited from class com.diffplug.gradle.spotless.FormatExtension
addStep, bumpThisNumberIfACustomStepChanges, clangFormat, clangFormat, clearSteps, createIndependentApplyTask, custom, custom, eclipseWtp, eclipseWtp, encoding, endWithNewline, getEncoding, getExistingStepIdx, getLineEndings, getProject, getRatchetFrom, ignoreErrorForPath, ignoreErrorForStep, indentWithSpaces, indentWithSpaces, indentWithTabs, indentWithTabs, isLicenseHeaderStep, licenseHeader, licenseHeaderFile, nativeCmd, noDefaultTargetException, parseTarget, provisioner, ratchetFrom, replace, replaceRegex, replaceStep, setEncoding, setEncoding, setLineEndings, setRatchetFrom, target, targetExclude, toggleOffOn, toggleOffOn, toggleOffOnDisable, toggleOffOnRegex, trimTrailingWhitespace, withinBlocks, withinBlocks, withinBlocksRegex, withinBlocksRegex
-
-
-
-
Constructor Detail
-
TypescriptExtension
@Inject public TypescriptExtension(SpotlessExtension spotless)
-
-
Method Detail
-
tsfmt
public TypescriptExtension.TypescriptFormatExtension tsfmt()
Uses the default version of typescript-format.
-
tsfmt
public TypescriptExtension.TypescriptFormatExtension tsfmt(String version)
Uses the specified version of typescript-format.
-
tsfmt
public TypescriptExtension.TypescriptFormatExtension tsfmt(Map<String,String> devDependencies)
Creates aTypescriptFormatExtensionusing exactly the specified npm packages.
-
prettier
public FormatExtension.PrettierConfig prettier()
Uses the default version of prettier.- Overrides:
prettierin classFormatExtension
-
prettier
public FormatExtension.PrettierConfig prettier(String version)
Uses the specified version of prettier.- Overrides:
prettierin classFormatExtension
-
prettier
public FormatExtension.PrettierConfig prettier(Map<String,String> devDependencies)
Uses exactly the npm packages specified in the map.- Overrides:
prettierin classFormatExtension
-
setupTask
protected void setupTask(SpotlessTask task)
Description copied from class:FormatExtensionSets up a format task according to the values in this extension.- Overrides:
setupTaskin classFormatExtension
-
-