Add support for using rollup.js to package up JavaScript.

Review Request #12763 — Created Jan. 5, 2023 and submitted — Latest diff uploaded

Information

Djblets
release-4.x

Reviewers

This introduces a new compiler for Pipeline that interfaces with
rollup.js to build JavaScript. Rollup can itself interface with Babel,
TypeScript, etc., and can handle resolving ES6 modules. This allows
consumers (including us) to begin modernizing JavaScript codebases.

The Rollup Pipeline compiler defaults to handling any index.js,
index.es6.js, or index.ts files included in the Pipeline bundle. It
will then compile the file and include its contents in the resulting
Pipeline bundle.

This allows projects to iteratively move to Rollup-bundled JavaScript
with module support, while still keeping legacy JavaScript in the same
bundle. Over time, projects can phase out all but the index file,
allowing Rollup to handle all the actual JavaScript compilation and
allowing Pipeline to handle versioning, resolving, and packaging the
resulting file.

Upcoming changes will begin to introduce usage of Rollup within the
Djblets codebase.

Tested this along with the rest of the modern JavaScript work.

I've verified that Rollup correctly executes within the right
environment for the source files being built, and respects the
appropriate configuration files.

Verified that outdated file checks take into account any files
included in the sourcemaps, and correctly triggers a rebuild only
when there's a change.

Commits

Files

    Loading...