Class BundlerOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.javascript.BundlerOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<BundlerOptions>
- Enclosing interface:
- BundlerOptions
@Stability(Experimental) public static final class BundlerOptions.Builder extends Object implements software.amazon.jsii.Builder<BundlerOptions>
A builder forBundlerOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BundlerOptions.BuilderaddToPreCompile(Boolean addToPreCompile)Deprecated.Use `runBundleTask` instead.BundlerOptions.BuilderassetsDir(String assetsDir)Sets the value ofBundlerOptions.getAssetsDir()BundlerOptionsbuild()Builds the configured instance.BundlerOptions.BuilderesbuildVersion(String esbuildVersion)Sets the value ofBundlerOptions.getEsbuildVersion()BundlerOptions.Builderloaders(Map<String,String> loaders)Sets the value ofBundlerOptions.getLoaders()BundlerOptions.BuilderrunBundleTask(RunBundleTask runBundleTask)Sets the value ofBundlerOptions.getRunBundleTask()
-
-
-
Method Detail
-
addToPreCompile
@Stability(Deprecated) @Deprecated public BundlerOptions.Builder addToPreCompile(Boolean addToPreCompile)
Deprecated.Use `runBundleTask` instead.Sets the value ofBundlerOptions.getAddToPreCompile()- Parameters:
addToPreCompile- Install thebundlecommand as a pre-compile phase.- Returns:
this
-
assetsDir
@Stability(Experimental) public BundlerOptions.Builder assetsDir(String assetsDir)
Sets the value ofBundlerOptions.getAssetsDir()- Parameters:
assetsDir- Output directory for all bundles.- Returns:
this
-
esbuildVersion
@Stability(Experimental) public BundlerOptions.Builder esbuildVersion(String esbuildVersion)
Sets the value ofBundlerOptions.getEsbuildVersion()- Parameters:
esbuildVersion- The semantic version requirement foresbuild.- Returns:
this
-
loaders
@Stability(Experimental) public BundlerOptions.Builder loaders(Map<String,String> loaders)
Sets the value ofBundlerOptions.getLoaders()- Parameters:
loaders- Map of file extensions (without dot) and loaders to use for this file type. Loaders are appended to the esbuild command by--loader:.extension=loader- Returns:
this
-
runBundleTask
@Stability(Experimental) public BundlerOptions.Builder runBundleTask(RunBundleTask runBundleTask)
Sets the value ofBundlerOptions.getRunBundleTask()- Parameters:
runBundleTask- Choose which phase (if any) to add thebundlecommand to. Note: If usingaddBundle()with thebundleCompiledResults, this option must be set toRunBundleTask.POST_COMPILEorRunBundleTask.MANUAL.- Returns:
this
-
build
@Stability(Experimental) public BundlerOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<BundlerOptions>- Returns:
- a new instance of
BundlerOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-