Class Bundler
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- io.github.cdklabs.projen.Component
-
- io.github.cdklabs.projen.javascript.Bundler
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:43.160Z") @Stability(Experimental) public class Bundler extends Component
(experimental) Adds support for bundling JavaScript applications and dependencies into a single file.In the future, this will also supports bundling websites.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBundler.Builder(experimental) A fluent builder forBundler.
-
Constructor Summary
Constructors Modifier Constructor Description Bundler(Project project)(experimental) Creates aBundler.Bundler(Project project, BundlerOptions options)(experimental) Creates aBundler.protectedBundler(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedBundler(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BundleaddBundle(String entrypoint, AddBundleOptions options)(experimental) Adds a task to the project which bundles a specific entrypoint and all of its dependencies into a single javascript output file.StringgetBundledir()(experimental) Root bundle directory.TaskgetBundleTask()(experimental) Gets or creates the singleton "bundle" task of the project.StringgetEsbuildVersion()(experimental) The semantic version requirement foresbuild(if defined).static Bundlerof(Project project)(experimental) Returns theBundlerinstance associated with a project orundefinedif there is no Bundler.-
Methods inherited from class io.github.cdklabs.projen.Component
getProject, isComponent, postSynthesize, preSynthesize, synthesize
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
Bundler
protected Bundler(software.amazon.jsii.JsiiObjectRef objRef)
-
Bundler
protected Bundler(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
Bundler
@Stability(Experimental) public Bundler(@NotNull Project project, @Nullable BundlerOptions options)(experimental) Creates aBundler.- Parameters:
project- This parameter is required.options-
-
Bundler
@Stability(Experimental) public Bundler(@NotNull Project project)(experimental) Creates aBundler.- Parameters:
project- This parameter is required.
-
-
Method Detail
-
of
@Stability(Experimental) @Nullable public static Bundler of(@NotNull Project project)
(experimental) Returns theBundlerinstance associated with a project orundefinedif there is no Bundler.- Parameters:
project- The project. This parameter is required.- Returns:
- A bundler
-
addBundle
@Stability(Experimental) @NotNull public Bundle addBundle(@NotNull String entrypoint, @NotNull AddBundleOptions options)
(experimental) Adds a task to the project which bundles a specific entrypoint and all of its dependencies into a single javascript output file.- Parameters:
entrypoint- The relative path of the artifact within the project. This parameter is required.options- Bundling options. This parameter is required.
-
getBundledir
@Stability(Experimental) @NotNull public String getBundledir()
(experimental) Root bundle directory.
-
getBundleTask
@Stability(Experimental) @NotNull public Task getBundleTask()
(experimental) Gets or creates the singleton "bundle" task of the project.If the project doesn't have a "bundle" task, it will be created and spawned during the pre-compile phase.
-
getEsbuildVersion
@Stability(Experimental) @Nullable public String getEsbuildVersion()
(experimental) The semantic version requirement foresbuild(if defined).
-
-