@nikovirtala/projen-constructs 0.3.79 → 0.3.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +263 -130
- package/docs/api/classes/Bundler.html +33 -6
- package/docs/api/classes/Colima.html +4 -0
- package/docs/api/classes/LambdaFunctionCodeBundle.html +22 -2
- package/docs/api/classes/LambdaFunctionConstructGenerator.html +4 -0
- package/docs/api/classes/LocalStack.html +4 -0
- package/docs/api/functions/convertToPosixPath.html +2 -0
- package/docs/api/functions/renderBundleName.html +9 -1
- package/docs/api/interfaces/Bundle.html +12 -3
- package/docs/api/interfaces/BundlerOptions.html +40 -4
- package/docs/api/interfaces/BundlingOptions.html +139 -12
- package/docs/api/interfaces/LambdaFunctionCodeBundleOptions.html +53 -5
- package/docs/api/interfaces/LambdaFunctionCodeBundlerOptions.html +26 -3
- package/docs/api/interfaces/LambdaFunctionConstructGeneratorOptions.html +90 -8
- package/docs/api/interfaces/LocalStackOptions.html +46 -4
- package/lib/components/bundle-lambda-function-code.d.ts +243 -0
- package/lib/components/bundle-lambda-function-code.js +75 -5
- package/lib/components/colima.d.ts +5 -0
- package/lib/components/colima.js +7 -2
- package/lib/components/homebrew.js +1 -1
- package/lib/components/lambda-function-construct-generator.d.ts +54 -0
- package/lib/components/lambda-function-construct-generator.js +7 -2
- package/lib/components/localstack.d.ts +32 -0
- package/lib/components/localstack.js +14 -2
- package/lib/components/mise.js +1 -1
- package/lib/components/typedoc.js +1 -1
- package/lib/components/vitest.js +1 -1
- package/lib/project-generator.js +1 -1
- package/lib/projects/awscdk-construct-library.generated.js +1 -1
- package/lib/projects/awscdk-typescript-app.generated.js +1 -1
- package/lib/projects/jsii.generated.js +1 -1
- package/lib/projects/typescript.generated.js +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">Bundler</a></li></ul>
|
|
12
12
|
<h1>Class Bundler</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Adds support for bundling JavaScript applications and dependencies into a
|
|
15
|
+
single file.</p>
|
|
16
|
+
</div></section>
|
|
13
17
|
<section class="tsd-panel tsd-hierarchy" data-refl="15">
|
|
14
18
|
<h4>Hierarchy</h4>
|
|
15
19
|
<ul class="tsd-hierarchy">
|
|
@@ -59,6 +63,8 @@
|
|
|
59
63
|
<li class="">
|
|
60
64
|
<div class="tsd-signature tsd-anchor-link" id="constructorbundler"><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">Bundler</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">project</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Project</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="../interfaces/BundlerOptions.html" class="tsd-signature-type tsd-kind-interface">BundlerOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">Bundler</a><a href="#constructorbundler" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
|
|
61
65
|
<div class="tsd-description">
|
|
66
|
+
<div class="tsd-comment tsd-typography"><p>Creates a <code>Bundler</code>.</p>
|
|
67
|
+
</div>
|
|
62
68
|
<div class="tsd-parameters">
|
|
63
69
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
64
70
|
<ul class="tsd-parameter-list">
|
|
@@ -71,10 +77,14 @@
|
|
|
71
77
|
<section>
|
|
72
78
|
<section class="tsd-panel tsd-member">
|
|
73
79
|
<h3 class="tsd-anchor-link" id="bundledir"><code class="tsd-tag">Readonly</code><span>bundledir</span><a href="#bundledir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
74
|
-
<div class="tsd-signature"><span class="tsd-kind-property">bundledir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div
|
|
80
|
+
<div class="tsd-signature"><span class="tsd-kind-property">bundledir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
81
|
+
<div class="tsd-comment tsd-typography"><p>Root bundle directory.</p>
|
|
82
|
+
</div></section>
|
|
75
83
|
<section class="tsd-panel tsd-member">
|
|
76
84
|
<h3 class="tsd-anchor-link" id="esbuildversion"><code class="tsd-tag">Readonly</code><span>esbuild<wbr/>Version</span><a href="#esbuildversion" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
77
|
-
<div class="tsd-signature"><span class="tsd-kind-property">esbuildVersion</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></div
|
|
85
|
+
<div class="tsd-signature"><span class="tsd-kind-property">esbuildVersion</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></div>
|
|
86
|
+
<div class="tsd-comment tsd-typography"><p>The semantic version requirement for <code>esbuild</code> (if defined).</p>
|
|
87
|
+
</div></section>
|
|
78
88
|
<section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external">
|
|
79
89
|
<h3 class="tsd-anchor-link" id="node"><code class="tsd-tag">Readonly</code><span>node</span><a href="#node" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
80
90
|
<div class="tsd-signature"><span class="tsd-kind-property">node</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Node</span></div>
|
|
@@ -94,6 +104,10 @@
|
|
|
94
104
|
<li>
|
|
95
105
|
<div class="tsd-signature" id="bundletaskbundletask"><span class="tsd-signature-keyword">get</span> <span class="tsd-kind-get-signature">bundleTask</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Task</span></div>
|
|
96
106
|
<div class="tsd-description">
|
|
107
|
+
<div class="tsd-comment tsd-typography"><p>Gets or creates the singleton "bundle" task of the project.</p>
|
|
108
|
+
<p>If the project doesn't have a "bundle" task, it will be created and spawned
|
|
109
|
+
during the pre-compile phase (unless <code>addToPreCompile</code> is <code>false</code>).</p>
|
|
110
|
+
</div>
|
|
97
111
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Task</span></h4></div></li></ul></section></section></details>
|
|
98
112
|
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
|
|
99
113
|
<h2 class="tsd-anchor-link" id="methods-1">Methods<a href="#methods-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
|
|
@@ -104,11 +118,18 @@
|
|
|
104
118
|
<li class="">
|
|
105
119
|
<div class="tsd-signature tsd-anchor-link" id="addbundle-1"><span class="tsd-kind-call-signature">addBundle</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">entrypoint</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/BundlingOptions.html" class="tsd-signature-type tsd-kind-interface">BundlingOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/Bundle.html" class="tsd-signature-type tsd-kind-interface">Bundle</a><a href="#addbundle-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
|
|
106
120
|
<div class="tsd-description">
|
|
121
|
+
<div class="tsd-comment tsd-typography"><p>Adds a task to the project which bundles a specific entrypoint and all of
|
|
122
|
+
its dependencies into a single javascript output file.</p>
|
|
123
|
+
</div>
|
|
107
124
|
<div class="tsd-parameters">
|
|
108
125
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
109
126
|
<ul class="tsd-parameter-list">
|
|
110
|
-
<li><span><span class="tsd-kind-parameter">entrypoint</span>: <span class="tsd-signature-type">string</span></span
|
|
111
|
-
<
|
|
127
|
+
<li><span><span class="tsd-kind-parameter">entrypoint</span>: <span class="tsd-signature-type">string</span></span>
|
|
128
|
+
<div class="tsd-comment tsd-typography"><p>The relative path of the artifact within the project</p>
|
|
129
|
+
</div></li>
|
|
130
|
+
<li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/BundlingOptions.html" class="tsd-signature-type tsd-kind-interface">BundlingOptions</a></span>
|
|
131
|
+
<div class="tsd-comment tsd-typography"><p>Bundling options</p>
|
|
132
|
+
</div></li></ul></div>
|
|
112
133
|
<h4 class="tsd-returns-title">Returns <a href="../interfaces/Bundle.html" class="tsd-signature-type tsd-kind-interface">Bundle</a></h4></div></li></ul></section>
|
|
113
134
|
<section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external">
|
|
114
135
|
<h3 class="tsd-anchor-link" id="postprojectcreation"><span>post<wbr/>Project<wbr/>Creation</span><a href="#postprojectcreation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
@@ -258,11 +279,17 @@ this type-testing method instead.</p>
|
|
|
258
279
|
<li class="">
|
|
259
280
|
<div class="tsd-signature tsd-anchor-link" id="of-1"><span class="tsd-kind-call-signature">of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">project</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Project</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">Bundler</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span><a href="#of-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
|
|
260
281
|
<div class="tsd-description">
|
|
282
|
+
<div class="tsd-comment tsd-typography"><p>Returns the <code>Bundler</code> instance associated with a project or <code>undefined</code> if
|
|
283
|
+
there is no Bundler.</p>
|
|
284
|
+
</div>
|
|
261
285
|
<div class="tsd-parameters">
|
|
262
286
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
263
287
|
<ul class="tsd-parameter-list">
|
|
264
|
-
<li><span><span class="tsd-kind-parameter">project</span>: <span class="tsd-signature-type">Project</span></span
|
|
265
|
-
<
|
|
288
|
+
<li><span><span class="tsd-kind-parameter">project</span>: <span class="tsd-signature-type">Project</span></span>
|
|
289
|
+
<div class="tsd-comment tsd-typography"><p>The project</p>
|
|
290
|
+
</div></li></ul></div>
|
|
291
|
+
<h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">Bundler</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></h4><p>A bundler</p>
|
|
292
|
+
</div></li></ul></section></section></details></div>
|
|
266
293
|
<div class="col-sidebar">
|
|
267
294
|
<div class="page-menu">
|
|
268
295
|
<div class="tsd-navigation settings">
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">Colima</a></li></ul>
|
|
12
12
|
<h1>Class Colima</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Colima component for projen projects.</p>
|
|
15
|
+
<p>Adds Colima support to your project with automatic installation and startup.</p>
|
|
16
|
+
</div></section>
|
|
13
17
|
<section class="tsd-panel tsd-hierarchy" data-refl="155">
|
|
14
18
|
<h4>Hierarchy</h4>
|
|
15
19
|
<ul class="tsd-hierarchy">
|
|
@@ -10,6 +10,20 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">LambdaFunctionCodeBundle</a></li></ul>
|
|
12
12
|
<h1>Class LambdaFunctionCodeBundle</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Generates a pre-bundled AWS Lambda Function code asset from handler code.</p>
|
|
15
|
+
<p>Adds a task to the project's <code>Bundler</code> that uses <code>esbuild</code> to bundle the
|
|
16
|
+
handler into the assets directory, and generates a file (e.g. <code>src/foo-code.ts</code>)
|
|
17
|
+
exporting an <code>aws_lambda.Code</code> constant (e.g. <code>FooFunctionCode</code>) that points to
|
|
18
|
+
the bundle. Pass it as the <code>code</code> of an <code>aws_lambda.Function</code>.</p>
|
|
19
|
+
<p>Requires a <code>Bundler</code> component in the project.</p>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="tsd-comment tsd-typography">
|
|
22
|
+
<div class="tsd-tag-example">
|
|
23
|
+
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Bundler</span><span class="hl-1">(</span><span class="hl-5">myProject</span><span class="hl-1">);</span><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">LambdaFunctionCodeBundle</span><span class="hl-1">(</span><span class="hl-5">myProject</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">entrypoint:</span><span class="hl-1"> </span><span class="hl-2">"src/foo.lambda.ts"</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">extension:</span><span class="hl-1"> </span><span class="hl-2">".lambda.ts"</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
|
|
24
|
+
</code><button type="button">Copy</button></pre>
|
|
25
|
+
|
|
26
|
+
</div></div></section>
|
|
13
27
|
<section class="tsd-panel tsd-hierarchy" data-refl="90">
|
|
14
28
|
<h4>Hierarchy</h4>
|
|
15
29
|
<ul class="tsd-hierarchy">
|
|
@@ -51,11 +65,17 @@
|
|
|
51
65
|
<li class="">
|
|
52
66
|
<div class="tsd-signature tsd-anchor-link" id="constructorlambdafunctioncodebundle"><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">LambdaFunctionCodeBundle</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">project</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Project</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/LambdaFunctionCodeBundleOptions.html" class="tsd-signature-type tsd-kind-interface">LambdaFunctionCodeBundleOptions</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">LambdaFunctionCodeBundle</a><a href="#constructorlambdafunctioncodebundle" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
|
|
53
67
|
<div class="tsd-description">
|
|
68
|
+
<div class="tsd-comment tsd-typography"><p>Defines a pre-bundled AWS Lambda Function code asset from handler code.</p>
|
|
69
|
+
</div>
|
|
54
70
|
<div class="tsd-parameters">
|
|
55
71
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
56
72
|
<ul class="tsd-parameter-list">
|
|
57
|
-
<li><span><span class="tsd-kind-parameter">project</span>: <span class="tsd-signature-type">Project</span></span
|
|
58
|
-
<
|
|
73
|
+
<li><span><span class="tsd-kind-parameter">project</span>: <span class="tsd-signature-type">Project</span></span>
|
|
74
|
+
<div class="tsd-comment tsd-typography"><p>The project to use</p>
|
|
75
|
+
</div></li>
|
|
76
|
+
<li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/LambdaFunctionCodeBundleOptions.html" class="tsd-signature-type tsd-kind-interface">LambdaFunctionCodeBundleOptions</a></span>
|
|
77
|
+
<div class="tsd-comment tsd-typography"><p>Options</p>
|
|
78
|
+
</div></li></ul></div>
|
|
59
79
|
<h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">LambdaFunctionCodeBundle</a></h4><aside class="tsd-sources">
|
|
60
80
|
<p>Overrides Component.constructor</p></aside></div></li></ul></section></section></details>
|
|
61
81
|
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">LambdaFunctionConstructGenerator</a></li></ul>
|
|
12
12
|
<h1>Class LambdaFunctionConstructGenerator</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>A projen component that generates AWS CDK Lambda Function constructs and bundles their code assets using esbuild.</p>
|
|
15
|
+
<p>The bundling happens during projen execution, not during CDK synth, enabling a "build once, deploy many" pattern.</p>
|
|
16
|
+
</div></section>
|
|
13
17
|
<section class="tsd-panel tsd-hierarchy" data-refl="234">
|
|
14
18
|
<h4>Hierarchy</h4>
|
|
15
19
|
<ul class="tsd-hierarchy">
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">LocalStack</a></li></ul>
|
|
12
12
|
<h1>Class LocalStack</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>LocalStack component for projen projects.</p>
|
|
15
|
+
<p>Adds LocalStack support to your project with automatic Docker/Colima setup.</p>
|
|
16
|
+
</div></section>
|
|
13
17
|
<section class="tsd-panel tsd-hierarchy" data-refl="291">
|
|
14
18
|
<h4>Hierarchy</h4>
|
|
15
19
|
<ul class="tsd-hierarchy">
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
<li class="">
|
|
16
16
|
<div class="tsd-signature tsd-anchor-link" id="converttoposixpath"><span class="tsd-kind-call-signature">convertToPosixPath</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">p</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#converttoposixpath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
|
|
17
17
|
<div class="tsd-description">
|
|
18
|
+
<div class="tsd-comment tsd-typography"><p>Converts the given path string to posix if it wasn't already.</p>
|
|
19
|
+
</div>
|
|
18
20
|
<div class="tsd-parameters">
|
|
19
21
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
20
22
|
<ul class="tsd-parameter-list">
|
|
@@ -15,11 +15,19 @@
|
|
|
15
15
|
<li class="">
|
|
16
16
|
<div class="tsd-signature tsd-anchor-link" id="renderbundlename"><span class="tsd-kind-call-signature">renderBundleName</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">entrypoint</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#renderbundlename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
|
|
17
17
|
<div class="tsd-description">
|
|
18
|
+
<div class="tsd-comment tsd-typography"><p>Renders the bundle name of an entrypoint: its path without the extension and without a leading <code>src</code> directory.</p>
|
|
19
|
+
</div>
|
|
18
20
|
<div class="tsd-parameters">
|
|
19
21
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
20
22
|
<ul class="tsd-parameter-list">
|
|
21
23
|
<li><span><span class="tsd-kind-parameter">entrypoint</span>: <span class="tsd-signature-type">string</span></span></li></ul></div>
|
|
22
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4
|
|
24
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
|
|
25
|
+
<div class="tsd-comment tsd-typography">
|
|
26
|
+
<div class="tsd-tag-example">
|
|
27
|
+
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">renderBundleName</span><span class="hl-1">(</span><span class="hl-2">"src/handlers/foo.lambda.ts"</span><span class="hl-1">) </span><span class="hl-8">// "handlers/foo.lambda"</span>
|
|
28
|
+
</code><button type="button">Copy</button></pre>
|
|
29
|
+
|
|
30
|
+
</div></div></div></li></ul></section></div>
|
|
23
31
|
<div class="col-sidebar">
|
|
24
32
|
<div class="page-menu">
|
|
25
33
|
<div class="tsd-navigation settings">
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">Bundle</a></li></ul>
|
|
12
12
|
<h1>Interface Bundle</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>A bundle created by <code>Bundler.addBundle</code>.</p>
|
|
15
|
+
</div></section>
|
|
13
16
|
<div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">Bundle</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#bundletask">bundleTask</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Task</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#outdir">outdir</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#outfile">outfile</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div>
|
|
14
17
|
<section class="tsd-panel-group tsd-index-group">
|
|
15
18
|
<section class="tsd-panel tsd-index-panel">
|
|
@@ -27,13 +30,19 @@
|
|
|
27
30
|
<section>
|
|
28
31
|
<section class="tsd-panel tsd-member">
|
|
29
32
|
<h3 class="tsd-anchor-link" id="bundletask"><code class="tsd-tag">Readonly</code><span>bundle<wbr/>Task</span><a href="#bundletask" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
30
|
-
<div class="tsd-signature"><span class="tsd-kind-property">bundleTask</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Task</span></div
|
|
33
|
+
<div class="tsd-signature"><span class="tsd-kind-property">bundleTask</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Task</span></div>
|
|
34
|
+
<div class="tsd-comment tsd-typography"><p>The task that produces this bundle.</p>
|
|
35
|
+
</div></section>
|
|
31
36
|
<section class="tsd-panel tsd-member">
|
|
32
37
|
<h3 class="tsd-anchor-link" id="outdir"><code class="tsd-tag">Readonly</code><span>outdir</span><a href="#outdir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
33
|
-
<div class="tsd-signature"><span class="tsd-kind-property">outdir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div
|
|
38
|
+
<div class="tsd-signature"><span class="tsd-kind-property">outdir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
39
|
+
<div class="tsd-comment tsd-typography"><p>Base directory containing the output file (relative to project root).</p>
|
|
40
|
+
</div></section>
|
|
34
41
|
<section class="tsd-panel tsd-member">
|
|
35
42
|
<h3 class="tsd-anchor-link" id="outfile"><code class="tsd-tag">Readonly</code><span>outfile</span><a href="#outfile" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
36
|
-
<div class="tsd-signature"><span class="tsd-kind-property">outfile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div
|
|
43
|
+
<div class="tsd-signature"><span class="tsd-kind-property">outfile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
44
|
+
<div class="tsd-comment tsd-typography"><p>Location of the output file (relative to project root).</p>
|
|
45
|
+
</div></section></section></details></div>
|
|
37
46
|
<div class="col-sidebar">
|
|
38
47
|
<div class="page-menu">
|
|
39
48
|
<div class="tsd-navigation settings">
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">BundlerOptions</a></li></ul>
|
|
12
12
|
<h1>Interface BundlerOptions</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Options for <code>Bundler</code>.</p>
|
|
15
|
+
</div></section>
|
|
13
16
|
<div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">BundlerOptions</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#addtoprecompile">addToPreCompile</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#assetsdir">assetsDir</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#esbuildversion">esbuildVersion</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#loaders">loaders</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div>
|
|
14
17
|
<section class="tsd-panel-group tsd-index-group">
|
|
15
18
|
<section class="tsd-panel tsd-index-panel">
|
|
@@ -28,16 +31,49 @@
|
|
|
28
31
|
<section>
|
|
29
32
|
<section class="tsd-panel tsd-member">
|
|
30
33
|
<h3 class="tsd-anchor-link" id="addtoprecompile"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>add<wbr/>To<wbr/>Pre<wbr/>Compile</span><a href="#addtoprecompile" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
31
|
-
<div class="tsd-signature"><span class="tsd-kind-property">addToPreCompile</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div
|
|
34
|
+
<div class="tsd-signature"><span class="tsd-kind-property">addToPreCompile</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div>
|
|
35
|
+
<div class="tsd-comment tsd-typography"><p>Install the <code>bundle</code> command as a pre-compile phase.</p>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="tsd-comment tsd-typography">
|
|
38
|
+
<div class="tsd-tag-default">
|
|
39
|
+
<h4 class="tsd-anchor-link" id="default">Default<a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-3">true</span>
|
|
40
|
+
</code><button type="button">Copy</button></pre>
|
|
41
|
+
|
|
42
|
+
</div></div></section>
|
|
32
43
|
<section class="tsd-panel tsd-member">
|
|
33
44
|
<h3 class="tsd-anchor-link" id="assetsdir"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>assets<wbr/>Dir</span><a href="#assetsdir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
34
|
-
<div class="tsd-signature"><span class="tsd-kind-property">assetsDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
45
|
+
<div class="tsd-signature"><span class="tsd-kind-property">assetsDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
46
|
+
<div class="tsd-comment tsd-typography"><p>Output directory for all bundles.</p>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="tsd-comment tsd-typography">
|
|
49
|
+
<div class="tsd-tag-default">
|
|
50
|
+
<h4 class="tsd-anchor-link" id="default-1">Default<a href="#default-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">"assets"</span>
|
|
51
|
+
</code><button type="button">Copy</button></pre>
|
|
52
|
+
|
|
53
|
+
</div></div></section>
|
|
35
54
|
<section class="tsd-panel tsd-member">
|
|
36
55
|
<h3 class="tsd-anchor-link" id="esbuildversion"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>esbuild<wbr/>Version</span><a href="#esbuildversion" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
37
|
-
<div class="tsd-signature"><span class="tsd-kind-property">esbuildVersion</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
56
|
+
<div class="tsd-signature"><span class="tsd-kind-property">esbuildVersion</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
57
|
+
<div class="tsd-comment tsd-typography"><p>The semantic version requirement for <code>esbuild</code>.</p>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="tsd-comment tsd-typography">
|
|
60
|
+
<div class="tsd-tag-default">
|
|
61
|
+
<h4 class="tsd-anchor-link" id="default-2">Default<a href="#default-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">- </span><span class="hl-5">no</span><span class="hl-1"> </span><span class="hl-5">specific</span><span class="hl-1"> </span><span class="hl-0">version</span><span class="hl-1"> (</span><span class="hl-5">implies</span><span class="hl-1"> </span><span class="hl-5">latest</span><span class="hl-1">)</span>
|
|
62
|
+
</code><button type="button">Copy</button></pre>
|
|
63
|
+
|
|
64
|
+
</div></div></section>
|
|
38
65
|
<section class="tsd-panel tsd-member">
|
|
39
66
|
<h3 class="tsd-anchor-link" id="loaders"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>loaders</span><a href="#loaders" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
40
|
-
<div class="tsd-signature"><span class="tsd-kind-property">loaders</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></div
|
|
67
|
+
<div class="tsd-signature"><span class="tsd-kind-property">loaders</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></div>
|
|
68
|
+
<div class="tsd-comment tsd-typography"><p>Map of file extensions (without dot) and loaders to use for this file type.
|
|
69
|
+
Loaders are appended to the esbuild command by <code>--loader:.extension=loader</code></p>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="tsd-comment tsd-typography">
|
|
72
|
+
<div class="tsd-tag-default">
|
|
73
|
+
<h4 class="tsd-anchor-link" id="default-3">Default<a href="#default-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">- </span><span class="hl-5">no</span><span class="hl-1"> </span><span class="hl-5">loaders</span>
|
|
74
|
+
</code><button type="button">Copy</button></pre>
|
|
75
|
+
|
|
76
|
+
</div></div></section></section></details></div>
|
|
41
77
|
<div class="col-sidebar">
|
|
42
78
|
<div class="page-menu">
|
|
43
79
|
<div class="tsd-navigation settings">
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">BundlingOptions</a></li></ul>
|
|
12
12
|
<h1>Interface BundlingOptions</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Options for bundling.</p>
|
|
15
|
+
</div></section>
|
|
13
16
|
<div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">BundlingOptions</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#banner">banner</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#externals">externals</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#format">format</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#loaders">loaders</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#mainfields">mainFields</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#minify">minify</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#outfile">outfile</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#platform">platform</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#sourcemap">sourcemap</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#sourcescontent">sourcesContent</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#target">target</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#tsconfigpath">tsconfigPath</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div>
|
|
14
17
|
<section class="tsd-panel-group tsd-index-group">
|
|
15
18
|
<section class="tsd-panel tsd-index-panel">
|
|
@@ -36,40 +39,164 @@
|
|
|
36
39
|
<section>
|
|
37
40
|
<section class="tsd-panel tsd-member">
|
|
38
41
|
<h3 class="tsd-anchor-link" id="banner"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>banner</span><a href="#banner" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
39
|
-
<div class="tsd-signature"><span class="tsd-kind-property">banner</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
42
|
+
<div class="tsd-signature"><span class="tsd-kind-property">banner</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
43
|
+
<div class="tsd-comment tsd-typography"><p>esbuild <code>--banner</code> argument, appended as is (so it starts with the file type, e.g. <code>:js=</code>).</p>
|
|
44
|
+
<p>The default defines <code>require</code> so that CommonJS dependencies work in an ES module bundle.</p>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="tsd-comment tsd-typography">
|
|
47
|
+
<div class="tsd-tag-default">
|
|
48
|
+
<h4 class="tsd-anchor-link" id="default">Default<a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">":js=import { createRequire as topLevelCreateRequire } from 'module';const require = topLevelCreateRequire(import.meta.url)"</span>
|
|
49
|
+
</code><button type="button">Copy</button></pre>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
<div class="tsd-tag-see">
|
|
53
|
+
<h4 class="tsd-anchor-link" id="see">See<a href="#see" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://esbuild.github.io/api/#banner">https://esbuild.github.io/api/#banner</a></p>
|
|
54
|
+
</div></div></section>
|
|
40
55
|
<section class="tsd-panel tsd-member">
|
|
41
56
|
<h3 class="tsd-anchor-link" id="externals"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>externals</span><a href="#externals" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
42
|
-
<div class="tsd-signature"><span class="tsd-kind-property">externals</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div
|
|
57
|
+
<div class="tsd-signature"><span class="tsd-kind-property">externals</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
|
|
58
|
+
<div class="tsd-comment tsd-typography"><p>You can mark a file or a package as external to exclude it from your build.
|
|
59
|
+
Instead of being bundled, the import will be preserved (using require for
|
|
60
|
+
the iife and cjs formats and using import for the esm format) and will be
|
|
61
|
+
evaluated at run time instead.</p>
|
|
62
|
+
<p>This has several uses. First of all, it can be used to trim unnecessary
|
|
63
|
+
code from your bundle for a code path that you know will never be executed.
|
|
64
|
+
For example, a package may contain code that only runs in node but you will
|
|
65
|
+
only be using that package in the browser. It can also be used to import
|
|
66
|
+
code in node at run time from a package that cannot be bundled. For
|
|
67
|
+
example, the fsevents package contains a native extension, which esbuild
|
|
68
|
+
doesn't support.</p>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="tsd-comment tsd-typography">
|
|
71
|
+
<div class="tsd-tag-default">
|
|
72
|
+
<h4 class="tsd-anchor-link" id="default-1">Default<a href="#default-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">[]</span>
|
|
73
|
+
</code><button type="button">Copy</button></pre>
|
|
74
|
+
|
|
75
|
+
</div></div></section>
|
|
43
76
|
<section class="tsd-panel tsd-member">
|
|
44
77
|
<h3 class="tsd-anchor-link" id="format"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>format</span><a href="#format" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
45
|
-
<div class="tsd-signature"><span class="tsd-kind-property">format</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
78
|
+
<div class="tsd-signature"><span class="tsd-kind-property">format</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
79
|
+
<div class="tsd-comment tsd-typography"><p>Output format for the generated JavaScript files: <code>"iife"</code>, <code>"cjs"</code> or <code>"esm"</code>.</p>
|
|
80
|
+
</div>
|
|
81
|
+
<div class="tsd-comment tsd-typography">
|
|
82
|
+
<div class="tsd-tag-default">
|
|
83
|
+
<h4 class="tsd-anchor-link" id="default-2">Default<a href="#default-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">"esm"</span>
|
|
84
|
+
</code><button type="button">Copy</button></pre>
|
|
85
|
+
|
|
86
|
+
</div>
|
|
87
|
+
<div class="tsd-tag-see">
|
|
88
|
+
<h4 class="tsd-anchor-link" id="see-1">See<a href="#see-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://esbuild.github.io/api/#format">https://esbuild.github.io/api/#format</a></p>
|
|
89
|
+
</div></div></section>
|
|
46
90
|
<section class="tsd-panel tsd-member">
|
|
47
91
|
<h3 class="tsd-anchor-link" id="loaders"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>loaders</span><a href="#loaders" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
48
|
-
<div class="tsd-signature"><span class="tsd-kind-property">loaders</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></div
|
|
92
|
+
<div class="tsd-signature"><span class="tsd-kind-property">loaders</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></div>
|
|
93
|
+
<div class="tsd-comment tsd-typography"><p>Map of file extensions (without dot) and loaders to use for this file type.
|
|
94
|
+
Loaders are appended to the esbuild command by <code>--loader:.extension=loader</code></p>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="tsd-comment tsd-typography">
|
|
97
|
+
<div class="tsd-tag-default">
|
|
98
|
+
<h4 class="tsd-anchor-link" id="default-3">Default<a href="#default-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><ul>
|
|
99
|
+
<li>the loaders of the <code>Bundler</code></li>
|
|
100
|
+
</ul>
|
|
101
|
+
</div></div></section>
|
|
49
102
|
<section class="tsd-panel tsd-member">
|
|
50
103
|
<h3 class="tsd-anchor-link" id="mainfields"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>main<wbr/>Fields</span><a href="#mainfields" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
51
|
-
<div class="tsd-signature"><span class="tsd-kind-property">mainFields</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
104
|
+
<div class="tsd-signature"><span class="tsd-kind-property">mainFields</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
105
|
+
<div class="tsd-comment tsd-typography"><p>Comma-separated list of <code>package.json</code> fields esbuild tries when resolving a package.</p>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="tsd-comment tsd-typography">
|
|
108
|
+
<div class="tsd-tag-default">
|
|
109
|
+
<h4 class="tsd-anchor-link" id="default-4">Default<a href="#default-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">"module,main"</span>
|
|
110
|
+
</code><button type="button">Copy</button></pre>
|
|
111
|
+
|
|
112
|
+
</div>
|
|
113
|
+
<div class="tsd-tag-see">
|
|
114
|
+
<h4 class="tsd-anchor-link" id="see-2">See<a href="#see-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://esbuild.github.io/api/#main-fields">https://esbuild.github.io/api/#main-fields</a></p>
|
|
115
|
+
</div></div></section>
|
|
52
116
|
<section class="tsd-panel tsd-member">
|
|
53
117
|
<h3 class="tsd-anchor-link" id="minify"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>minify</span><a href="#minify" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
54
|
-
<div class="tsd-signature"><span class="tsd-kind-property">minify</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div
|
|
118
|
+
<div class="tsd-signature"><span class="tsd-kind-property">minify</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div>
|
|
119
|
+
<div class="tsd-comment tsd-typography"><p>Minify the bundle.</p>
|
|
120
|
+
</div>
|
|
121
|
+
<div class="tsd-comment tsd-typography">
|
|
122
|
+
<div class="tsd-tag-default">
|
|
123
|
+
<h4 class="tsd-anchor-link" id="default-5">Default<a href="#default-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-3">true</span>
|
|
124
|
+
</code><button type="button">Copy</button></pre>
|
|
125
|
+
|
|
126
|
+
</div>
|
|
127
|
+
<div class="tsd-tag-see">
|
|
128
|
+
<h4 class="tsd-anchor-link" id="see-3">See<a href="#see-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://esbuild.github.io/api/#minify">https://esbuild.github.io/api/#minify</a></p>
|
|
129
|
+
</div></div></section>
|
|
55
130
|
<section class="tsd-panel tsd-member">
|
|
56
131
|
<h3 class="tsd-anchor-link" id="outfile"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>outfile</span><a href="#outfile" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
57
|
-
<div class="tsd-signature"><span class="tsd-kind-property">outfile</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
132
|
+
<div class="tsd-signature"><span class="tsd-kind-property">outfile</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
133
|
+
<div class="tsd-comment tsd-typography"><p>Bundler output path relative to the asset's output directory.</p>
|
|
134
|
+
</div>
|
|
135
|
+
<div class="tsd-comment tsd-typography">
|
|
136
|
+
<div class="tsd-tag-default">
|
|
137
|
+
<h4 class="tsd-anchor-link" id="default-6">Default<a href="#default-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">"index.mjs"</span>
|
|
138
|
+
</code><button type="button">Copy</button></pre>
|
|
139
|
+
|
|
140
|
+
</div></div></section>
|
|
58
141
|
<section class="tsd-panel tsd-member">
|
|
59
142
|
<h3 class="tsd-anchor-link" id="platform"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>platform</span><a href="#platform" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
60
|
-
<div class="tsd-signature"><span class="tsd-kind-property">platform</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
143
|
+
<div class="tsd-signature"><span class="tsd-kind-property">platform</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
144
|
+
<div class="tsd-comment tsd-typography"><p>esbuild platform.</p>
|
|
145
|
+
</div>
|
|
146
|
+
<div class="tsd-comment tsd-typography">
|
|
147
|
+
<div class="tsd-tag-default">
|
|
148
|
+
<h4 class="tsd-anchor-link" id="default-7">Default<a href="#default-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">"node"</span>
|
|
149
|
+
</code><button type="button">Copy</button></pre>
|
|
150
|
+
|
|
151
|
+
</div></div></section>
|
|
61
152
|
<section class="tsd-panel tsd-member">
|
|
62
153
|
<h3 class="tsd-anchor-link" id="sourcemap"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>sourcemap</span><a href="#sourcemap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
63
|
-
<div class="tsd-signature"><span class="tsd-kind-property">sourcemap</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div
|
|
154
|
+
<div class="tsd-signature"><span class="tsd-kind-property">sourcemap</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div>
|
|
155
|
+
<div class="tsd-comment tsd-typography"><p>Include a source map in the bundle.</p>
|
|
156
|
+
</div>
|
|
157
|
+
<div class="tsd-comment tsd-typography">
|
|
158
|
+
<div class="tsd-tag-default">
|
|
159
|
+
<h4 class="tsd-anchor-link" id="default-8">Default<a href="#default-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-3">true</span>
|
|
160
|
+
</code><button type="button">Copy</button></pre>
|
|
161
|
+
|
|
162
|
+
</div></div></section>
|
|
64
163
|
<section class="tsd-panel tsd-member">
|
|
65
164
|
<h3 class="tsd-anchor-link" id="sourcescontent"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>sources<wbr/>Content</span><a href="#sourcescontent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
66
|
-
<div class="tsd-signature"><span class="tsd-kind-property">sourcesContent</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div
|
|
165
|
+
<div class="tsd-signature"><span class="tsd-kind-property">sourcesContent</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div>
|
|
166
|
+
<div class="tsd-comment tsd-typography"><p>Include the original source code in the source map.</p>
|
|
167
|
+
</div>
|
|
168
|
+
<div class="tsd-comment tsd-typography">
|
|
169
|
+
<div class="tsd-tag-default">
|
|
170
|
+
<h4 class="tsd-anchor-link" id="default-9">Default<a href="#default-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-3">false</span>
|
|
171
|
+
</code><button type="button">Copy</button></pre>
|
|
172
|
+
|
|
173
|
+
</div>
|
|
174
|
+
<div class="tsd-tag-see">
|
|
175
|
+
<h4 class="tsd-anchor-link" id="see-4">See<a href="#see-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://esbuild.github.io/api/#sources-content">https://esbuild.github.io/api/#sources-content</a></p>
|
|
176
|
+
</div></div></section>
|
|
67
177
|
<section class="tsd-panel tsd-member">
|
|
68
178
|
<h3 class="tsd-anchor-link" id="target"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>target</span><a href="#target" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
69
|
-
<div class="tsd-signature"><span class="tsd-kind-property">target</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
179
|
+
<div class="tsd-signature"><span class="tsd-kind-property">target</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
180
|
+
<div class="tsd-comment tsd-typography"><p>esbuild target.</p>
|
|
181
|
+
</div>
|
|
182
|
+
<div class="tsd-comment tsd-typography">
|
|
183
|
+
<div class="tsd-tag-default">
|
|
184
|
+
<h4 class="tsd-anchor-link" id="default-10">Default<a href="#default-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">"esnext"</span>
|
|
185
|
+
</code><button type="button">Copy</button></pre>
|
|
186
|
+
|
|
187
|
+
</div></div></section>
|
|
70
188
|
<section class="tsd-panel tsd-member">
|
|
71
189
|
<h3 class="tsd-anchor-link" id="tsconfigpath"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>tsconfig<wbr/>Path</span><a href="#tsconfigpath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
72
|
-
<div class="tsd-signature"><span class="tsd-kind-property">tsconfigPath</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
190
|
+
<div class="tsd-signature"><span class="tsd-kind-property">tsconfigPath</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
191
|
+
<div class="tsd-comment tsd-typography"><p>The path of the tsconfig.json file to use for bundling.</p>
|
|
192
|
+
<p><code>LambdaFunctionCodeBundle</code> always sets this to the project's development tsconfig.</p>
|
|
193
|
+
</div>
|
|
194
|
+
<div class="tsd-comment tsd-typography">
|
|
195
|
+
<div class="tsd-tag-default">
|
|
196
|
+
<h4 class="tsd-anchor-link" id="default-11">Default<a href="#default-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">- </span><span class="hl-5">no</span><span class="hl-1"> </span><span class="hl-5">tsconfig</span><span class="hl-1"> </span><span class="hl-5">is</span><span class="hl-1"> </span><span class="hl-5">passed</span><span class="hl-1"> </span><span class="hl-5">to</span><span class="hl-1"> </span><span class="hl-5">esbuild</span>
|
|
197
|
+
</code><button type="button">Copy</button></pre>
|
|
198
|
+
|
|
199
|
+
</div></div></section></section></details></div>
|
|
73
200
|
<div class="col-sidebar">
|
|
74
201
|
<div class="page-menu">
|
|
75
202
|
<div class="tsd-navigation settings">
|