Provide JavaScript/TypeScript config files when packaging extensions.
Review Request #13663 — Created March 24, 2024 and submitted
Review Board's extension packaging support now uses the new static media
extension packaging classes introduced in Djblets 5. These gives us the
ability to hook into the build process to generate configuration files
for building modern JavaScript/TypeScript codebases.When building an extension, the following files are now created if they
don't already exist:
babel.config.json
rollup.config.mjs
tsconfig.json
These all provide basic defaults suitable for the extension, and are set
to inherit the versions of these files packaged with Review Board.
On top of this, the JavaScript/TypeScript codebases from the installed
Djblets and Review Board packages are included as NPM workspaces, offering
@beanbag/djblets
and @beanbag/reviewboard
ESM module imports. This is
primarily useful for TypeScript definitions.
Currently, the configuration and workspace links are only generated when
first building an extension. In the future, we'll want to generate them
when creating an extension in the first place.
Successfully built
rbintegrations
against this, and verified that the
files and workspaces were present.
Summary | ID |
---|---|
b323af86f7d3d3d2660293613f444c74f00762d0 |
- Change Summary:
-
Incorporated a parent change that got left out (and mostly overridden -- an early stage of this change).
- Commits:
-
Summary ID 2e67338de4eb9d293b7b873e7438633950d2b03a b323af86f7d3d3d2660293613f444c74f00762d0 - Diff:
-
Revision 2 (+350 -28)