public interface JSweetOptions
| Modifier and Type | Field and Description |
|---|---|
static String |
bundle
Constant string for the 'bundle' option.
|
static String |
candiesJsOut
Constant string for the 'candiesJsOut' option.
|
static String |
declaration
Constant string for the 'declaration' option.
|
static String |
disableSinglePrecisionFloats
Constant string for the 'disableSinglePrecisionFloats' option.
|
static String |
dtsout
Constant string for the 'dtsout' option.
|
static String |
enableAssertions
Constant string for the 'enableAssertions' option.
|
static String |
encoding
Constant string for the 'encoding' option.
|
static String |
extraSystemPath
Constant string for the 'extraSystemPath' option.
|
static String |
header
Constant string for the 'header' option.
|
static String |
ignoreDefinitions
Constant string for the 'ignoreDefinitions' option.
|
static String |
jsout
Constant string for the 'jsout' option.
|
static String |
module
Constant string for the 'module' option.
|
static String |
moduleResolution
Constant string for the 'moduleResolution' option.
|
static String |
noRootDirectories
Constant string for the 'noRootDirectories' option.
|
static String[] |
options
All the supported options.
|
static String |
sourceMap
Constant string for the 'sourceMap' option.
|
static String |
targetVersion
Constant string for the 'targetVersion' option.
|
static String |
tsOnly
Constant string for the 'tsOnly' option.
|
static String |
tsout
Constant string for the 'tsout' option.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAdapters()
A list of adapter class names (fully qualified) to be used to extend the
transpiler behavior.
|
Map<String,Object> |
getConfiguration()
Returns the configuration from the configuration file.
|
File |
getConfigurationFile()
The configuration file, which is by default the
jsweetconfig.json file in the current project. |
File |
getDeclarationsOutputDir()
Gets the current .d.ts output directory (only if the declaration option
is set).
|
EcmaScriptComplianceLevel |
getEcmaTargetVersion()
The targeted ECMAScript version.
|
String |
getEncoding()
Gets the expected Java source code encoding.
|
File |
getExtractedCandyJavascriptDir()
The directory where the transpiler should put the extracted JavaScript
files from candies.
|
File |
getHeaderFile()
Gets the file containing the header to be added to the generated files.
|
File |
getJsOutputDir()
Gets the current JavaScript output directory.
|
ModuleKind |
getModuleKind()
Gets the module kind when transpiling to code using JavaScript modules.
|
ModuleResolution |
getModuleResolution()
Determines how modules get resolved.
|
File |
getSourceRoot()
Gets the source root for the source map files.
|
File |
getTsOutputDir()
Gets the current TypeScript output directory.
|
boolean |
isBundle()
Tells if this transpiler generates JavaScript bundles for running in a
Web browser.
|
boolean |
isDebugMode()
If true, the transpiler generates code that can be debugged with
JavaScript.
|
boolean |
isDisableSinglePrecisionFloats()
By default, for a target version >=ES5, JSweet will force Java floats to
be mapped to JavaScript numbers that will be constrained with the
Math.fround function.
|
boolean |
isGenerateDeclarations()
Generates d.ts files along with the js files.
|
boolean |
isGenerateDefinitions()
Generated definitions from def.* packages in d.ts files.
|
boolean |
isGenerateJsFiles()
If false, do not compile TypeScript output (let an external TypeScript
compiler do so).
|
boolean |
isGenerateSourceMaps()
Tells if the transpiler generates js.map files for Java debugging.
|
boolean |
isGenerateTsFiles()
If false, do not generate TypeScript output (just validate the Java
source code and do not transpile anything).
|
boolean |
isIgnoreAssertions()
Tells if the transpiler should ignore the 'assert' statements or generate
appropriate code.
|
boolean |
isIgnoreJavaErrors()
If true, JSweet will ignore any message reported by Java (including
error).
|
boolean |
isIgnoreJavaFileNameError()
Generates output code even if the main class is not placed within a file
of the same name.
|
boolean |
isIgnoreTypeScriptErrors()
If true, JSweet will ignore any message reported by TypeScript (including
error) and the compilation will be successful if no Java error is raised.
|
boolean |
isNoRootDirectories()
Tells if this transpiler skips the root directories (packages annotated
with @jsweet.lang.Root) so that the generated file hierarchy starts at
the root directories rather than including the entire directory
structure.
|
boolean |
isPreserveSourceLineNumbers()
Deprecated.
use
isGenerateSourceMaps() instead |
boolean |
isSkipTypeScriptChecks() |
boolean |
isTscWatchMode() |
boolean |
isUsingModules() |
boolean |
isVerbose()
If true, JSweet has been launched in verbose mode.
|
static final String bundle
static final String noRootDirectories
static final String sourceMap
static final String module
static final String encoding
static final String enableAssertions
static final String declaration
static final String tsOnly
static final String ignoreDefinitions
static final String header
static final String disableSinglePrecisionFloats
static final String targetVersion
static final String tsout
static final String dtsout
static final String jsout
static final String candiesJsOut
static final String moduleResolution
static final String extraSystemPath
static final String[] options
Map<String,Object> getConfiguration()
@Deprecated boolean isPreserveSourceLineNumbers()
isGenerateSourceMaps() insteadboolean isGenerateSourceMaps()
File getSourceRoot()
File getTsOutputDir()
File getJsOutputDir()
File getDeclarationsOutputDir()
By default, declarations are placed in the JavaScript output directory.
ModuleKind getModuleKind()
boolean isBundle()
String getEncoding()
boolean isNoRootDirectories()
boolean isIgnoreAssertions()
boolean isIgnoreJavaFileNameError()
boolean isGenerateDeclarations()
File getExtractedCandyJavascriptDir()
boolean isGenerateJsFiles()
boolean isGenerateTsFiles()
boolean isGenerateDefinitions()
boolean isIgnoreTypeScriptErrors()
boolean isIgnoreJavaErrors()
File getHeaderFile()
boolean isDebugMode()
boolean isVerbose()
boolean isDisableSinglePrecisionFloats()
EcmaScriptComplianceLevel getEcmaTargetVersion()
List<String> getAdapters()
PrinterAdapter that adapts the TypeScript default printer in
order to tune the generated code. All the adapter classes must be
accessible within the 'jsweet_extension' directory to be created at the
root of the transpiled project. The adapter classes can be provided as
Java class files (*.class) or Java source files (*.java). In the latter
case, they will be on-the-fly compiled by JSweet.PrinterAdapterModuleResolution getModuleResolution()
File getConfigurationFile()
jsweetconfig.json file in the current project.boolean isUsingModules()
boolean isSkipTypeScriptChecks()
boolean isTscWatchMode()