projen 0.33.10 → 0.34.0

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.
Files changed (101) hide show
  1. package/.jsii +227 -237
  2. package/API.md +75 -84
  3. package/docs/aws-lambda.md +5 -4
  4. package/docs/bundling.md +30 -0
  5. package/lib/awscdk/auto-discover.d.ts +0 -13
  6. package/lib/awscdk/auto-discover.js +5 -15
  7. package/lib/awscdk/cdk-config.js +1 -1
  8. package/lib/awscdk/cdk-tasks.js +1 -1
  9. package/lib/awscdk/java-app.js +1 -1
  10. package/lib/awscdk/lambda-function.d.ts +16 -26
  11. package/lib/awscdk/lambda-function.js +29 -27
  12. package/lib/awscdk-app-ts.js +2 -3
  13. package/lib/awscdk-construct.js +3 -4
  14. package/lib/cdk8s-app-ts.js +1 -1
  15. package/lib/cdk8s-construct.js +1 -1
  16. package/lib/cdktf-construct.js +1 -1
  17. package/lib/component.js +1 -1
  18. package/lib/construct-lib.js +1 -1
  19. package/lib/deps/dependencies.js +1 -1
  20. package/lib/dev-env.js +1 -1
  21. package/lib/docker-compose.js +2 -2
  22. package/lib/eslint.js +1 -1
  23. package/lib/file.js +1 -1
  24. package/lib/git/gitattributes.js +1 -1
  25. package/lib/github/auto-approve.js +1 -1
  26. package/lib/github/auto-merge.js +1 -1
  27. package/lib/github/dependabot.js +1 -1
  28. package/lib/github/github.js +1 -1
  29. package/lib/github/mergify.js +1 -1
  30. package/lib/github/pr-template.js +1 -1
  31. package/lib/github/pull-request-lint.js +1 -1
  32. package/lib/github/stale.js +1 -1
  33. package/lib/github/task-workflow.js +1 -1
  34. package/lib/github/workflows.js +1 -1
  35. package/lib/gitpod.js +1 -1
  36. package/lib/ignore-file.js +1 -1
  37. package/lib/ini.js +1 -1
  38. package/lib/java/java-project.js +1 -1
  39. package/lib/java/junit.js +1 -1
  40. package/lib/java/maven-compile.js +1 -1
  41. package/lib/java/maven-packaging.js +1 -1
  42. package/lib/java/maven-sample.js +1 -1
  43. package/lib/java/pom.js +1 -1
  44. package/lib/java/projenrc.js +1 -1
  45. package/lib/javascript/bundler.d.ts +69 -33
  46. package/lib/javascript/bundler.js +43 -17
  47. package/lib/javascript/npm-config.js +1 -1
  48. package/lib/javascript/projenrc.js +1 -1
  49. package/lib/javascript/util.d.ts +1 -0
  50. package/lib/javascript/util.js +16 -0
  51. package/lib/jest.js +1 -1
  52. package/lib/jsii-project.js +1 -1
  53. package/lib/json/projenrc.js +1 -1
  54. package/lib/json.js +1 -1
  55. package/lib/license.js +1 -1
  56. package/lib/logger.js +1 -1
  57. package/lib/makefile.js +1 -1
  58. package/lib/node-package.js +1 -1
  59. package/lib/node-project.d.ts +2 -2
  60. package/lib/node-project.js +2 -2
  61. package/lib/object-file.js +1 -1
  62. package/lib/project-build.js +1 -1
  63. package/lib/project.js +6 -5
  64. package/lib/projects.js +1 -1
  65. package/lib/python/pip.js +1 -1
  66. package/lib/python/poetry.js +2 -2
  67. package/lib/python/projenrc.js +1 -1
  68. package/lib/python/pytest.js +1 -1
  69. package/lib/python/python-project.js +1 -1
  70. package/lib/python/python-sample.js +1 -1
  71. package/lib/python/requirements-file.js +1 -1
  72. package/lib/python/setuppy.js +1 -1
  73. package/lib/python/setuptools.js +1 -1
  74. package/lib/python/venv.js +1 -1
  75. package/lib/readme.js +1 -1
  76. package/lib/release/publisher.js +1 -1
  77. package/lib/release/release-trigger.js +1 -1
  78. package/lib/release/release.js +1 -1
  79. package/lib/sample-file.js +2 -2
  80. package/lib/semver.js +1 -1
  81. package/lib/source-code.js +1 -1
  82. package/lib/tasks/runtime.js +1 -1
  83. package/lib/tasks/task.js +1 -1
  84. package/lib/tasks/tasks.js +1 -1
  85. package/lib/textfile.js +1 -1
  86. package/lib/toml.js +1 -1
  87. package/lib/typescript/projenrc.js +1 -1
  88. package/lib/typescript-config.js +1 -1
  89. package/lib/typescript.js +3 -3
  90. package/lib/upgrade-dependencies.js +2 -2
  91. package/lib/version.js +1 -1
  92. package/lib/vscode/devcontainer.js +1 -1
  93. package/lib/vscode/launch-config.js +1 -1
  94. package/lib/vscode/vscode.js +1 -1
  95. package/lib/web/next.js +3 -3
  96. package/lib/web/postcss.js +1 -1
  97. package/lib/web/react.js +4 -4
  98. package/lib/web/tailwind.js +1 -1
  99. package/lib/xmlfile.js +1 -1
  100. package/lib/yaml.js +1 -1
  101. package/package.json +1 -1
package/API.md CHANGED
@@ -214,9 +214,10 @@ Name|Description
214
214
  [java.PluginOptions](#projen-java-pluginoptions)|Options for Maven plugins.
215
215
  [java.PomOptions](#projen-java-pomoptions)|Options for `Pom`.
216
216
  [java.ProjenrcOptions](#projen-java-projenrcoptions)|Options for `Projenrc`.
217
- [javascript.BundleOptions](#projen-javascript-bundleoptions)|Options for bundling.
218
- [javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)|Common options for `Bundler`.
217
+ [javascript.AddBundleOptions](#projen-javascript-addbundleoptions)|Options for `addBundle()`.
218
+ [javascript.Bundle](#projen-javascript-bundle)|*No description*
219
219
  [javascript.BundlerOptions](#projen-javascript-bundleroptions)|Options for `Bundler`.
220
+ [javascript.BundlingOptions](#projen-javascript-bundlingoptions)|Options for bundling.
220
221
  [javascript.NpmConfigOptions](#projen-javascript-npmconfigoptions)|Options to configure the local NPM config.
221
222
  [javascript.ProjenrcOptions](#projen-javascript-projenrcoptions)|*No description*
222
223
  [json.ProjenrcOptions](#projen-json-projenrcoptions)|*No description*
@@ -410,7 +411,7 @@ new AwsCdkConstructLibrary(options: AwsCdkConstructLibraryOptions)
410
411
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
411
412
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
412
413
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
413
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
414
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
414
415
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
415
416
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
416
417
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -621,7 +622,7 @@ new AwsCdkTypeScriptApp(options: AwsCdkTypeScriptAppOptions)
621
622
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
622
623
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
623
624
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
624
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
625
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
625
626
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
626
627
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
627
628
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -799,7 +800,7 @@ new Cdk8sTypeScriptApp(options: Cdk8sTypeScriptAppOptions)
799
800
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
800
801
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
801
802
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
802
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
803
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
803
804
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
804
805
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
805
806
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -1030,7 +1031,7 @@ new ConstructLibrary(options: ConstructLibraryOptions)
1030
1031
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
1031
1032
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
1032
1033
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
1033
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
1034
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
1034
1035
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
1035
1036
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
1036
1037
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -1185,7 +1186,7 @@ new ConstructLibraryAws(options: AwsCdkConstructLibraryOptions)
1185
1186
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
1186
1187
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
1187
1188
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
1188
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
1189
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
1189
1190
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
1190
1191
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
1191
1192
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -1353,7 +1354,7 @@ new ConstructLibraryCdk8s(options: ConstructLibraryCdk8sOptions)
1353
1354
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
1354
1355
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
1355
1356
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
1356
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
1357
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
1357
1358
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
1358
1359
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
1359
1360
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -1528,7 +1529,7 @@ new ConstructLibraryCdktf(options: ConstructLibraryCdktfOptions)
1528
1529
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
1529
1530
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
1530
1531
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
1531
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
1532
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
1532
1533
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
1533
1534
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
1534
1535
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -2601,7 +2602,7 @@ new JsiiProject(options: JsiiProjectOptions)
2601
2602
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
2602
2603
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
2603
2604
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
2604
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
2605
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
2605
2606
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
2606
2607
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
2607
2608
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -3355,7 +3356,7 @@ new NodeProject(options: NodeProjectOptions)
3355
3356
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
3356
3357
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
3357
3358
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
3358
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
3359
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
3359
3360
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
3360
3361
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
3361
3362
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -4520,7 +4521,7 @@ new TypeScriptAppProject(options: TypeScriptProjectOptions)
4520
4521
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
4521
4522
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
4522
4523
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
4523
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
4524
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
4524
4525
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
4525
4526
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
4526
4527
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -4661,7 +4662,7 @@ new TypeScriptLibraryProject(options: TypeScriptProjectOptions)
4661
4662
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
4662
4663
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
4663
4664
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
4664
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
4665
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
4665
4666
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
4666
4667
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
4667
4668
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -4802,7 +4803,7 @@ new TypeScriptProject(options: TypeScriptProjectOptions)
4802
4803
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
4803
4804
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
4804
4805
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
4805
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
4806
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
4806
4807
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
4807
4808
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
4808
4809
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -5172,26 +5173,10 @@ new awscdk.AutoDiscover(project: Project, options: AutoDiscoverOptions)
5172
5173
 
5173
5174
  * **project** (<code>[Project](#projen-project)</code>) *No description*
5174
5175
  * **options** (<code>[awscdk.AutoDiscoverOptions](#projen-awscdk-autodiscoveroptions)</code>) *No description*
5175
- * **libdir** (<code>string</code>) Output directory (where .js files go).
5176
5176
  * **srcdir** (<code>string</code>) Project source tree (relative to project output directory).
5177
5177
  * **lambdaOptions** (<code>[awscdk.LambdaFunctionCommonOptions](#projen-awscdk-lambdafunctioncommonoptions)</code>) Options for auto-discovery of AWS Lambda functions. __*Optional*__
5178
5178
 
5179
5179
 
5180
- ### Methods
5181
-
5182
-
5183
- #### preSynthesize()🔹 <a id="projen-awscdk-autodiscover-presynthesize"></a>
5184
-
5185
- Called before synthesis.
5186
-
5187
- ```ts
5188
- preSynthesize(): void
5189
- ```
5190
-
5191
-
5192
-
5193
-
5194
-
5195
5180
 
5196
5181
 
5197
5182
  ## class AwsCdkJavaApp 🔹 <a id="projen-awscdk-awscdkjavaapp"></a>
@@ -5389,24 +5374,14 @@ new awscdk.LambdaFunction(project: Project, options: LambdaFunctionOptions)
5389
5374
 
5390
5375
  * **project** (<code>[Project](#projen-project)</code>) The project to use.
5391
5376
  * **options** (<code>[awscdk.LambdaFunctionOptions](#projen-awscdk-lambdafunctionoptions)</code>) Options.
5392
- * **externals** (<code>Array<string></code>) Names of modules which should not be included in the bundle. __*Default*__: by default, the "aws-sdk" module will be excluded from the bundle. Note that if you use this option you will need to add "aws-sdk" explicitly.
5377
+ * **bundlingOptions** (<code>[javascript.BundlingOptions](#projen-javascript-bundlingoptions)</code>) Bundling options for this AWS Lambda function. __*Default*__: defaults
5393
5378
  * **runtime** (<code>[awscdk.LambdaRuntime](#projen-awscdk-lambdaruntime)</code>) The node.js version to target. __*Default*__: Runtime.NODEJS_14_X
5394
5379
  * **entrypoint** (<code>string</code>) A path from the project root directory to a TypeScript file which contains the AWS Lambda handler entrypoint (exports a `handler` function).
5395
- * **libdir** (<code>string</code>) JavaScript output directory (where .js files go).
5396
- * **srcdir** (<code>string</code>) Project source directory tree (where .ts files live).
5397
5380
  * **constructFile** (<code>string</code>) The name of the generated TypeScript source file. __*Default*__: The name of the entrypoint file, with the `-function.ts` suffix instead of `.lambda.ts`.
5398
5381
  * **constructName** (<code>string</code>) The name of the generated `lambda.Function` subclass. __*Default*__: A pascal cased version of the name of the entrypoint file, with the extension `Function` (e.g. `ResizeImageFunction`).
5399
5382
 
5400
5383
 
5401
5384
 
5402
- ### Properties
5403
-
5404
-
5405
- Name | Type | Description
5406
- -----|------|-------------
5407
- **bundleTask**🔹 | <code>[tasks.Task](#projen-tasks-task)</code> | The bundle task for this function.
5408
-
5409
-
5410
5385
 
5411
5386
  ## class LambdaRuntime 🔹 <a id="projen-awscdk-lambdaruntime"></a>
5412
5387
 
@@ -6453,6 +6428,8 @@ Name | Type | Description
6453
6428
 
6454
6429
  Adds support for bundling JavaScript applications and dependencies into a single file.
6455
6430
 
6431
+ In the future, this will also supports bundling websites.
6432
+
6456
6433
  __Submodule__: javascript
6457
6434
 
6458
6435
  __Extends__: [Component](#projen-component)
@@ -6468,6 +6445,7 @@ new javascript.Bundler(project: Project, options?: BundlerOptions)
6468
6445
 
6469
6446
  * **project** (<code>[Project](#projen-project)</code>) *No description*
6470
6447
  * **options** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) *No description*
6448
+ * **assetsDir** (<code>string</code>) Output directory for all bundles. __*Default*__: "assets"
6471
6449
  * **esbuildVersion** (<code>string</code>) The semantic version requirement for `esbuild`. __*Default*__: no specific version (implies latest)
6472
6450
 
6473
6451
 
@@ -6478,31 +6456,30 @@ new javascript.Bundler(project: Project, options?: BundlerOptions)
6478
6456
  Name | Type | Description
6479
6457
  -----|------|-------------
6480
6458
  **bundleTask**🔹 | <code>[tasks.Task](#projen-tasks-task)</code> | Gets or creates the singleton "bundle" task of the project.
6481
- **esbuildVersion**?🔹 | <code>string</code> | __*Optional*__
6459
+ **bundledir**🔹 | <code>string</code> | Root bundle directory.
6460
+ **esbuildVersion**?🔹 | <code>string</code> | The semantic version requirement for `esbuild` (if defined).<br/>__*Optional*__
6482
6461
 
6483
6462
  ### Methods
6484
6463
 
6485
6464
 
6486
- #### addBundle(name, options)🔹 <a id="projen-javascript-bundler-addbundle"></a>
6465
+ #### addBundle(entrypoint, options)🔹 <a id="projen-javascript-bundler-addbundle"></a>
6487
6466
 
6488
6467
  Adds a task to the project which bundles a specific entrypoint and all of its dependencies into a single javascript output file.
6489
6468
 
6490
6469
  ```ts
6491
- addBundle(name: string, options: BundleOptions): Task
6470
+ addBundle(entrypoint: string, options: AddBundleOptions): Bundle
6492
6471
  ```
6493
6472
 
6494
- * **name** (<code>string</code>) The name of the artifact (the task will be named `bundle:$name`).
6495
- * **options** (<code>[javascript.BundleOptions](#projen-javascript-bundleoptions)</code>) Bundling options.
6496
- * **entrypoint** (<code>string</code>) The entrypoint of the code you wish to bundle.
6497
- * **outfile** (<code>string</code>) This option sets the output file name for the build operation.
6498
- * **platform** (<code>string</code>) esbuild platform.
6499
- * **target** (<code>string</code>) esbuild target.
6473
+ * **entrypoint** (<code>string</code>) *No description*
6474
+ * **options** (<code>[javascript.AddBundleOptions](#projen-javascript-addbundleoptions)</code>) Bundling options.
6500
6475
  * **externals** (<code>Array<string></code>) You can mark a file or a package as external to exclude it from your build. __*Default*__: []
6501
- * **sourcemap** (<code>boolean</code>) Include a source map in the bundle. __*Default*__: true
6476
+ * **sourcemap** (<code>boolean</code>) Include a source map in the bundle. __*Default*__: false
6502
6477
  * **watchTask** (<code>boolean</code>) In addition to the `bundle:xyz` task, creates `bundle:xyz:watch` task which will invoke the same esbuild command with the `--watch` flag. __*Default*__: true
6478
+ * **platform** (<code>string</code>) esbuild platform.
6479
+ * **target** (<code>string</code>) esbuild target.
6503
6480
 
6504
6481
  __Returns__:
6505
- * <code>[tasks.Task](#projen-tasks-task)</code>
6482
+ * <code>[javascript.Bundle](#projen-javascript-bundle)</code>
6506
6483
 
6507
6484
  #### *static* of(project)🔹 <a id="projen-javascript-bundler-of"></a>
6508
6485
 
@@ -8295,7 +8272,7 @@ new web.NextJsProject(options: NextJsProjectOptions)
8295
8272
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
8296
8273
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
8297
8274
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
8298
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
8275
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
8299
8276
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
8300
8277
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
8301
8278
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -8435,7 +8412,7 @@ new web.NextJsTypeScriptProject(options: NextJsTypeScriptProjectOptions)
8435
8412
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
8436
8413
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
8437
8414
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
8438
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
8415
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
8439
8416
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
8440
8417
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
8441
8418
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -8648,7 +8625,7 @@ new web.ReactProject(options: ReactProjectOptions)
8648
8625
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
8649
8626
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
8650
8627
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
8651
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
8628
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
8652
8629
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
8653
8630
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
8654
8631
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -8829,7 +8806,7 @@ new web.ReactTypeScriptProject(options: ReactTypeScriptProjectOptions)
8829
8806
  * **autoApproveProjenUpgrades** (<code>boolean</code>) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: false
8830
8807
  * **autoApproveUpgrades** (<code>boolean</code>) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). __*Default*__: true
8831
8808
  * **buildWorkflow** (<code>boolean</code>) Define a GitHub workflow for building PRs. __*Default*__: true if not a subproject
8832
- * **bundlerOptions** (<code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code>) Options for `Bundler`. __*Optional*__
8809
+ * **bundlerOptions** (<code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code>) Options for `Bundler`. __*Optional*__
8833
8810
  * **codeCov** (<code>boolean</code>) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. __*Default*__: false
8834
8811
  * **codeCovTokenSecret** (<code>string</code>) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. __*Default*__: if this option is not specified, only public repositories are supported
8835
8812
  * **copyrightOwner** (<code>string</code>) License copyright owner. __*Default*__: defaults to the value of authorName or "" if `authorName` is undefined.
@@ -8955,7 +8932,7 @@ Name | Type | Description
8955
8932
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
8956
8933
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
8957
8934
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
8958
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
8935
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
8959
8936
  **catalog**?🔹 | <code>[Catalog](#projen-catalog)</code> | Libraries will be picked up by the construct catalog when they are published to npm as jsii modules and will be published under:.<br/>__*Default*__: new version will be announced
8960
8937
  **cdkAssert**?🔹 | <code>boolean</code> | Install the @aws-cdk/assert library?<br/>__*Default*__: true
8961
8938
  **cdkDependencies**?🔹 | <code>Array<string></code> | Which AWS CDK modules (those that start with "@aws-cdk/") does this library require when consumed?<br/>__*Optional*__
@@ -9109,7 +9086,7 @@ Name | Type | Description
9109
9086
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
9110
9087
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
9111
9088
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
9112
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9089
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9113
9090
  **cdkDependencies**?🔹 | <code>Array<string></code> | Which AWS CDK modules (those that start with "@aws-cdk/") this app uses.<br/>__*Optional*__
9114
9091
  **cdkVersionPinning**?🔹 | <code>boolean</code> | Use pinned version instead of caret version for CDK.<br/>__*Default*__: false
9115
9092
  **cdkout**?🔹 | <code>string</code> | cdk.out directory.<br/>__*Default*__: "cdk.out"
@@ -9266,7 +9243,7 @@ Name | Type | Description
9266
9243
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
9267
9244
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
9268
9245
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
9269
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9246
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9270
9247
  **cdk8sCliVersion**?🔹 | <code>string</code> | cdk8s-cli version.<br/>__*Default*__: "cdk8sVersion"
9271
9248
  **cdk8sCliVersionPinning**?🔹 | <code>boolean</code> | Use pinned version instead of caret version for CDK8s-cli.<br/>__*Default*__: false
9272
9249
  **cdk8sPlusVersion**?🔹 | <code>string</code> | cdk8s-plus-17 version.<br/>__*Default*__: "cdk8sVersion"
@@ -9424,7 +9401,7 @@ Name | Type | Description
9424
9401
  **bin**?⚠️ | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
9425
9402
  **buildWorkflow**?⚠️ | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
9426
9403
  **bundledDeps**?⚠️ | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
9427
- **bundlerOptions**?⚠️ | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9404
+ **bundlerOptions**?⚠️ | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9428
9405
  **catalog**?⚠️ | <code>[Catalog](#projen-catalog)</code> | Libraries will be picked up by the construct catalog when they are published to npm as jsii modules and will be published under:.<br/>__*Default*__: new version will be announced
9429
9406
  **cdkAssert**?⚠️ | <code>boolean</code> | Install the @aws-cdk/assert library?<br/>__*Default*__: true
9430
9407
  **cdkDependencies**?⚠️ | <code>Array<string></code> | Which AWS CDK modules (those that start with "@aws-cdk/") does this library require when consumed?<br/>__*Optional*__
@@ -9580,7 +9557,7 @@ Name | Type | Description
9580
9557
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
9581
9558
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
9582
9559
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
9583
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9560
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9584
9561
  **catalog**?🔹 | <code>[Catalog](#projen-catalog)</code> | Libraries will be picked up by the construct catalog when they are published to npm as jsii modules and will be published under:.<br/>__*Default*__: new version will be announced
9585
9562
  **cdk8sPlusVersion**?🔹 | <code>string</code> | cdk8s-plus-17 version.<br/>__*Default*__: "cdk8sVersion"
9586
9563
  **cdk8sPlusVersionPinning**?🔹 | <code>boolean</code> | Use pinned version instead of caret version for cdk8s-plus-17.<br/>__*Default*__: false
@@ -9733,7 +9710,7 @@ Name | Type | Description
9733
9710
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
9734
9711
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
9735
9712
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
9736
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9713
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9737
9714
  **catalog**?🔹 | <code>[Catalog](#projen-catalog)</code> | Libraries will be picked up by the construct catalog when they are published to npm as jsii modules and will be published under:.<br/>__*Default*__: new version will be announced
9738
9715
  **clobber**?🔹 | <code>boolean</code> | Add a `clobber` task which resets the repo to origin.<br/>__*Default*__: true
9739
9716
  **codeArtifactOptions**?🔹 | <code>[CodeArtifactOptions](#projen-codeartifactoptions)</code> | Options for publishing npm package to AWS CodeArtifact.<br/>__*Default*__: undefined
@@ -9880,7 +9857,7 @@ Name | Type | Description
9880
9857
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
9881
9858
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
9882
9859
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
9883
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9860
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
9884
9861
  **catalog**?🔹 | <code>[Catalog](#projen-catalog)</code> | Libraries will be picked up by the construct catalog when they are published to npm as jsii modules and will be published under:.<br/>__*Default*__: new version will be announced
9885
9862
  **clobber**?🔹 | <code>boolean</code> | Add a `clobber` task which resets the repo to origin.<br/>__*Default*__: true
9886
9863
  **codeArtifactOptions**?🔹 | <code>[CodeArtifactOptions](#projen-codeartifactoptions)</code> | Options for publishing npm package to AWS CodeArtifact.<br/>__*Default*__: undefined
@@ -10716,7 +10693,7 @@ Name | Type | Description
10716
10693
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
10717
10694
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
10718
10695
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
10719
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
10696
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
10720
10697
  **clobber**?🔹 | <code>boolean</code> | Add a `clobber` task which resets the repo to origin.<br/>__*Default*__: true
10721
10698
  **codeArtifactOptions**?🔹 | <code>[CodeArtifactOptions](#projen-codeartifactoptions)</code> | Options for publishing npm package to AWS CodeArtifact.<br/>__*Default*__: undefined
10722
10699
  **codeCov**?🔹 | <code>boolean</code> | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret.<br/>__*Default*__: false
@@ -11004,7 +10981,7 @@ Name | Type | Description
11004
10981
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
11005
10982
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
11006
10983
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
11007
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
10984
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
11008
10985
  **clobber**?🔹 | <code>boolean</code> | Add a `clobber` task which resets the repo to origin.<br/>__*Default*__: true
11009
10986
  **codeArtifactOptions**?🔹 | <code>[CodeArtifactOptions](#projen-codeartifactoptions)</code> | Options for publishing npm package to AWS CodeArtifact.<br/>__*Default*__: undefined
11010
10987
  **codeCov**?🔹 | <code>boolean</code> | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret.<br/>__*Default*__: false
@@ -11355,7 +11332,7 @@ Name | Type | Description
11355
11332
  **bin**?⚠️ | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
11356
11333
  **buildWorkflow**?⚠️ | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
11357
11334
  **bundledDeps**?⚠️ | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
11358
- **bundlerOptions**?⚠️ | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
11335
+ **bundlerOptions**?⚠️ | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
11359
11336
  **clobber**?⚠️ | <code>boolean</code> | Add a `clobber` task which resets the repo to origin.<br/>__*Default*__: true
11360
11337
  **codeArtifactOptions**?⚠️ | <code>[CodeArtifactOptions](#projen-codeartifactoptions)</code> | Options for publishing npm package to AWS CodeArtifact.<br/>__*Default*__: undefined
11361
11338
  **codeCov**?⚠️ | <code>boolean</code> | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret.<br/>__*Default*__: false
@@ -11488,7 +11465,7 @@ Name | Type | Description
11488
11465
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
11489
11466
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
11490
11467
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
11491
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
11468
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
11492
11469
  **clobber**?🔹 | <code>boolean</code> | Add a `clobber` task which resets the repo to origin.<br/>__*Default*__: true
11493
11470
  **codeArtifactOptions**?🔹 | <code>[CodeArtifactOptions](#projen-codeartifactoptions)</code> | Options for publishing npm package to AWS CodeArtifact.<br/>__*Default*__: undefined
11494
11471
  **codeCov**?🔹 | <code>boolean</code> | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret.<br/>__*Default*__: false
@@ -11712,7 +11689,6 @@ Options for `AutoDiscover`.
11712
11689
 
11713
11690
  Name | Type | Description
11714
11691
  -----|------|-------------
11715
- **libdir**🔹 | <code>string</code> | Output directory (where .js files go).
11716
11692
  **srcdir**🔹 | <code>string</code> | Project source tree (relative to project output directory).
11717
11693
  **lambdaOptions**?🔹 | <code>[awscdk.LambdaFunctionCommonOptions](#projen-awscdk-lambdafunctioncommonoptions)</code> | Options for auto-discovery of AWS Lambda functions.<br/>__*Optional*__
11718
11694
 
@@ -11820,7 +11796,7 @@ auto-discovery.
11820
11796
 
11821
11797
  Name | Type | Description
11822
11798
  -----|------|-------------
11823
- **externals**?🔹 | <code>Array<string></code> | Names of modules which should not be included in the bundle.<br/>__*Default*__: by default, the "aws-sdk" module will be excluded from the bundle. Note that if you use this option you will need to add "aws-sdk" explicitly.
11799
+ **bundlingOptions**?🔹 | <code>[javascript.BundlingOptions](#projen-javascript-bundlingoptions)</code> | Bundling options for this AWS Lambda function.<br/>__*Default*__: defaults
11824
11800
  **runtime**?🔹 | <code>[awscdk.LambdaRuntime](#projen-awscdk-lambdaruntime)</code> | The node.js version to target.<br/>__*Default*__: Runtime.NODEJS_14_X
11825
11801
 
11826
11802
 
@@ -11835,11 +11811,9 @@ Options for `Function`.
11835
11811
  Name | Type | Description
11836
11812
  -----|------|-------------
11837
11813
  **entrypoint**🔹 | <code>string</code> | A path from the project root directory to a TypeScript file which contains the AWS Lambda handler entrypoint (exports a `handler` function).
11838
- **libdir**🔹 | <code>string</code> | JavaScript output directory (where .js files go).
11839
- **srcdir**🔹 | <code>string</code> | Project source directory tree (where .ts files live).
11814
+ **bundlingOptions**?🔹 | <code>[javascript.BundlingOptions](#projen-javascript-bundlingoptions)</code> | Bundling options for this AWS Lambda function.<br/>__*Default*__: defaults
11840
11815
  **constructFile**?🔹 | <code>string</code> | The name of the generated TypeScript source file.<br/>__*Default*__: The name of the entrypoint file, with the `-function.ts` suffix instead of `.lambda.ts`.
11841
11816
  **constructName**?🔹 | <code>string</code> | The name of the generated `lambda.Function` subclass.<br/>__*Default*__: A pascal cased version of the name of the entrypoint file, with the extension `Function` (e.g. `ResizeImageFunction`).
11842
- **externals**?🔹 | <code>Array<string></code> | Names of modules which should not be included in the bundle.<br/>__*Default*__: by default, the "aws-sdk" module will be excluded from the bundle. Note that if you use this option you will need to add "aws-sdk" explicitly.
11843
11817
  **runtime**?🔹 | <code>[awscdk.LambdaRuntime](#projen-awscdk-lambdaruntime)</code> | The node.js version to target.<br/>__*Default*__: Runtime.NODEJS_14_X
11844
11818
 
11845
11819
 
@@ -12380,35 +12354,36 @@ Name | Type | Description
12380
12354
 
12381
12355
 
12382
12356
 
12383
- ## struct BundleOptions 🔹 <a id="projen-javascript-bundleoptions"></a>
12357
+ ## struct AddBundleOptions 🔹 <a id="projen-javascript-addbundleoptions"></a>
12384
12358
 
12385
12359
 
12386
- Options for bundling.
12360
+ Options for `addBundle()`.
12387
12361
 
12388
12362
 
12389
12363
 
12390
12364
  Name | Type | Description
12391
12365
  -----|------|-------------
12392
- **entrypoint**🔹 | <code>string</code> | The entrypoint of the code you wish to bundle.
12393
- **outfile**🔹 | <code>string</code> | This option sets the output file name for the build operation.
12394
12366
  **platform**🔹 | <code>string</code> | esbuild platform.
12395
12367
  **target**🔹 | <code>string</code> | esbuild target.
12396
12368
  **externals**?🔹 | <code>Array<string></code> | You can mark a file or a package as external to exclude it from your build.<br/>__*Default*__: []
12397
- **sourcemap**?🔹 | <code>boolean</code> | Include a source map in the bundle.<br/>__*Default*__: true
12369
+ **sourcemap**?🔹 | <code>boolean</code> | Include a source map in the bundle.<br/>__*Default*__: false
12398
12370
  **watchTask**?🔹 | <code>boolean</code> | In addition to the `bundle:xyz` task, creates `bundle:xyz:watch` task which will invoke the same esbuild command with the `--watch` flag.<br/>__*Default*__: true
12399
12371
 
12400
12372
 
12401
12373
 
12402
- ## struct BundlerCommonOptions 🔹 <a id="projen-javascript-bundlercommonoptions"></a>
12374
+ ## struct Bundle 🔹 <a id="projen-javascript-bundle"></a>
12375
+
12376
+ __Obtainable from__: [Bundler](#projen-javascript-bundler).[addBundle](#projen-javascript-bundler#projen-javascript-bundler-addbundle)()
12403
12377
 
12404
12378
 
12405
- Common options for `Bundler`.
12406
12379
 
12407
12380
 
12408
12381
 
12409
12382
  Name | Type | Description
12410
12383
  -----|------|-------------
12411
- **esbuildVersion**?🔹 | <code>string</code> | The semantic version requirement for `esbuild`.<br/>__*Default*__: no specific version (implies latest)
12384
+ **bundleTask**🔹 | <code>[tasks.Task](#projen-tasks-task)</code> | The task that produces this bundle.
12385
+ **outfile**🔹 | <code>string</code> | Location of the output file (relative to project root).
12386
+ **watchTask**?🔹 | <code>[tasks.Task](#projen-tasks-task)</code> | The "watch" task for this bundle.<br/>__*Optional*__
12412
12387
 
12413
12388
 
12414
12389
 
@@ -12421,10 +12396,26 @@ Options for `Bundler`.
12421
12396
 
12422
12397
  Name | Type | Description
12423
12398
  -----|------|-------------
12399
+ **assetsDir**?🔹 | <code>string</code> | Output directory for all bundles.<br/>__*Default*__: "assets"
12424
12400
  **esbuildVersion**?🔹 | <code>string</code> | The semantic version requirement for `esbuild`.<br/>__*Default*__: no specific version (implies latest)
12425
12401
 
12426
12402
 
12427
12403
 
12404
+ ## struct BundlingOptions 🔹 <a id="projen-javascript-bundlingoptions"></a>
12405
+
12406
+
12407
+ Options for bundling.
12408
+
12409
+
12410
+
12411
+ Name | Type | Description
12412
+ -----|------|-------------
12413
+ **externals**?🔹 | <code>Array<string></code> | You can mark a file or a package as external to exclude it from your build.<br/>__*Default*__: []
12414
+ **sourcemap**?🔹 | <code>boolean</code> | Include a source map in the bundle.<br/>__*Default*__: false
12415
+ **watchTask**?🔹 | <code>boolean</code> | In addition to the `bundle:xyz` task, creates `bundle:xyz:watch` task which will invoke the same esbuild command with the `--watch` flag.<br/>__*Default*__: true
12416
+
12417
+
12418
+
12428
12419
  ## struct NpmConfigOptions 🔹 <a id="projen-javascript-npmconfigoptions"></a>
12429
12420
 
12430
12421
 
@@ -13365,7 +13356,7 @@ Name | Type | Description
13365
13356
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
13366
13357
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
13367
13358
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
13368
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
13359
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
13369
13360
  **clobber**?🔹 | <code>boolean</code> | Add a `clobber` task which resets the repo to origin.<br/>__*Default*__: true
13370
13361
  **codeArtifactOptions**?🔹 | <code>[CodeArtifactOptions](#projen-codeartifactoptions)</code> | Options for publishing npm package to AWS CodeArtifact.<br/>__*Default*__: undefined
13371
13362
  **codeCov**?🔹 | <code>boolean</code> | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret.<br/>__*Default*__: false
@@ -13485,7 +13476,7 @@ Name | Type | Description
13485
13476
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
13486
13477
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
13487
13478
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
13488
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
13479
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
13489
13480
  **clobber**?🔹 | <code>boolean</code> | Add a `clobber` task which resets the repo to origin.<br/>__*Default*__: true
13490
13481
  **codeArtifactOptions**?🔹 | <code>[CodeArtifactOptions](#projen-codeartifactoptions)</code> | Options for publishing npm package to AWS CodeArtifact.<br/>__*Default*__: undefined
13491
13482
  **codeCov**?🔹 | <code>boolean</code> | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret.<br/>__*Default*__: false
@@ -13648,7 +13639,7 @@ Name | Type | Description
13648
13639
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
13649
13640
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
13650
13641
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
13651
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
13642
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
13652
13643
  **clobber**?🔹 | <code>boolean</code> | Add a `clobber` task which resets the repo to origin.<br/>__*Default*__: true
13653
13644
  **codeArtifactOptions**?🔹 | <code>[CodeArtifactOptions](#projen-codeartifactoptions)</code> | Options for publishing npm package to AWS CodeArtifact.<br/>__*Default*__: undefined
13654
13645
  **codeCov**?🔹 | <code>boolean</code> | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret.<br/>__*Default*__: false
@@ -13796,7 +13787,7 @@ Name | Type | Description
13796
13787
  **bin**?🔹 | <code>Map<string, string></code> | Binary programs vended with your module.<br/>__*Optional*__
13797
13788
  **buildWorkflow**?🔹 | <code>boolean</code> | Define a GitHub workflow for building PRs.<br/>__*Default*__: true if not a subproject
13798
13789
  **bundledDeps**?🔹 | <code>Array<string></code> | List of dependencies to bundle into this module.<br/>__*Optional*__
13799
- **bundlerOptions**?🔹 | <code>[javascript.BundlerCommonOptions](#projen-javascript-bundlercommonoptions)</code> | Options for `Bundler`.<br/>__*Optional*__
13790
+ **bundlerOptions**?🔹 | <code>[javascript.BundlerOptions](#projen-javascript-bundleroptions)</code> | Options for `Bundler`.<br/>__*Optional*__
13800
13791
  **clobber**?🔹 | <code>boolean</code> | Add a `clobber` task which resets the repo to origin.<br/>__*Default*__: true
13801
13792
  **codeArtifactOptions**?🔹 | <code>[CodeArtifactOptions](#projen-codeartifactoptions)</code> | Options for publishing npm package to AWS CodeArtifact.<br/>__*Default*__: undefined
13802
13793
  **codeCov**?🔹 | <code>boolean</code> | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret.<br/>__*Default*__: false
@@ -74,8 +74,11 @@ new AwsCdkConstructLibrary({
74
74
  // target node.js runtime
75
75
  runtime: awscdk.LambdaRuntime.NODEJS_14_X,
76
76
 
77
- // list of node modules to exclude from the bundle
78
- externals: [ 'aws-sdk' ]
77
+ bundlingOptions: {
78
+ // list of node modules to exclude from the bundle
79
+ externals: [ 'aws-sdk' ],
80
+ sourcemap: true,
81
+ }
79
82
  }
80
83
  });
81
84
  ```
@@ -95,8 +98,6 @@ const p = new AwsCdkTypeScriptApp({
95
98
  });
96
99
 
97
100
  new awscdk.LambdaFunction(p, {
98
- srcdir: p.srcdir,
99
- libdir: p.libdir,
100
101
  entrypoint: 'src/foo.lambda.ts', // .lambda.ts extension is still required
101
102
  runtime: aws_lambda.Runtime.NODEJS_12_X,
102
103
  });
@@ -0,0 +1,30 @@
1
+ # Bundling
2
+
3
+ The `Bundler` component (for Node.js projects) can be used to produce JavaScript
4
+ bundles from source files.
5
+
6
+ It is included by default in all projects derived from `NodeProject`.
7
+
8
+ To customize, use `bundlerOptions`:
9
+
10
+ ```ts
11
+ const project = new NodeProject({
12
+ esbuildVersion: '^0.13.13', // default to "latest"
13
+ assetsDir: 'resources', // defaults to "assets"
14
+ });
15
+ ```
16
+
17
+ To add bundles, call `bundler.addBundle()`:
18
+
19
+ ```ts
20
+ project.bundler.addBundle('name-of-bundle', {
21
+ entrypoint: 'src/foo.ts',
22
+ target: 'node14',
23
+ platform: 'node',
24
+ bundlingOptions: {
25
+ externals: ['aws-sdk'], // modules not to include in bundles
26
+ sourcemap: true, // default is false
27
+ watchTask: false, // should we create a "bundle:watch" task for each bundle
28
+ }
29
+ });
30
+ ```