Enum RunBundleTask
- java.lang.Object
-
- java.lang.Enum<RunBundleTask>
-
- io.github.cdklabs.projen.javascript.RunBundleTask
-
- All Implemented Interfaces:
Serializable,Comparable<RunBundleTask>
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:43.202Z") @Stability(Experimental) public enum RunBundleTask extends Enum<RunBundleTask>
(experimental) Options for BundlerOptions.runBundleTask.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MANUAL(experimental) Don't bundle automatically as part of the build.POST_COMPILE(experimental) Bundle automatically after compilation.PRE_COMPILE(experimental) Bundle automatically before compilation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RunBundleTaskvalueOf(String name)Returns the enum constant of this type with the specified name.static RunBundleTask[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MANUAL
@Stability(Experimental) public static final RunBundleTask MANUAL
(experimental) Don't bundle automatically as part of the build.
-
PRE_COMPILE
@Stability(Experimental) public static final RunBundleTask PRE_COMPILE
(experimental) Bundle automatically before compilation.
-
POST_COMPILE
@Stability(Experimental) public static final RunBundleTask POST_COMPILE
(experimental) Bundle automatically after compilation. This is useful if you want to bundle the compiled results.Thus will run compilation tasks (using tsc, etc.) before running file through bundling step.
This is only required unless you are using new experimental features that are not supported by
esbuildbut are supported by typescript'stsccompiler. One example of such feature isemitDecoratorMetadata.// In a TypeScript project with output configured // to go to the "lib" directory: const project = new TypeScriptProject({ name: "test", defaultReleaseBranch: "main", tsconfig: { compilerOptions: { outDir: "lib", }, }, bundlerOptions: { // ensure we compile with `tsc` before bundling runBundleTask: RunBundleTask.POST_COMPILE, }, }); // Tell the bundler to bundle the compiled results (from the "lib" directory) project.bundler.addBundle("./lib/index.js", { platform: "node", target: "node18", sourcemap: false, format: "esm", });
-
-
Method Detail
-
values
public static RunBundleTask[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RunBundleTask c : RunBundleTask.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RunBundleTask valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-