Class Bundler.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.javascript.Bundler.Builder
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Bundler.BuilderaddToPreCompile(Boolean addToPreCompile)Deprecated.UserunBundleTaskinstead.Bundler.BuilderassetsDir(String assetsDir)(experimental) Output directory for all bundles.Bundlerbuild()static Bundler.Buildercreate(Project project)Bundler.BuilderesbuildVersion(String esbuildVersion)(experimental) The semantic version requirement foresbuild.Bundler.Builderloaders(Map<String,String> loaders)(experimental) Map of file extensions (without dot) and loaders to use for this file type.Bundler.BuilderrunBundleTask(RunBundleTask runBundleTask)(experimental) Choose which phase (if any) to add thebundlecommand to.
-
-
-
Method Detail
-
create
@Stability(Experimental) public static Bundler.Builder create(Project project)
- Parameters:
project- This parameter is required.- Returns:
- a new instance of
Bundler.Builder.
-
addToPreCompile
@Stability(Deprecated) @Deprecated public Bundler.Builder addToPreCompile(Boolean addToPreCompile)
Deprecated.UserunBundleTaskinstead.(deprecated) Install thebundlecommand as a pre-compile phase.Default: true
- Parameters:
addToPreCompile- Install thebundlecommand as a pre-compile phase. This parameter is required.- Returns:
this
-
assetsDir
@Stability(Experimental) public Bundler.Builder assetsDir(String assetsDir)
(experimental) Output directory for all bundles.Default: "assets"
- Parameters:
assetsDir- Output directory for all bundles. This parameter is required.- Returns:
this
-
esbuildVersion
@Stability(Experimental) public Bundler.Builder esbuildVersion(String esbuildVersion)
(experimental) The semantic version requirement foresbuild.Default: - no specific version (implies latest)
- Parameters:
esbuildVersion- The semantic version requirement foresbuild. This parameter is required.- Returns:
this
-
loaders
@Stability(Experimental) public Bundler.Builder loaders(Map<String,String> loaders)
(experimental) 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- Parameters:
loaders- Map of file extensions (without dot) and loaders to use for this file type. This parameter is required.- Returns:
this
-
runBundleTask
@Stability(Experimental) public Bundler.Builder runBundleTask(RunBundleTask runBundleTask)
(experimental) Choose which phase (if any) to add thebundlecommand to.Note: If using
addBundle()with thebundleCompiledResults, this option must be set toRunBundleTask.POST_COMPILEorRunBundleTask.MANUAL.Default: RunBundleTask.PRE_COMPILE
- Parameters:
runBundleTask- Choose which phase (if any) to add thebundlecommand to. This parameter is required.- Returns:
this- See Also:
- AddBundleOptions.bundleCompiledResults *
-
-