buildozer
buildozer copied to clipboard
Feature/rollup
Still in draft, please refrain from reviewing WIP.
This pull request introduces Rollup to allow for bundling of JavaScript.
- This allows you to import first/third party modules from any JavaScript file.
- Allows us to easily integrate features like; TypeScript, outputing manifests, dynamic imports (for lazy loading modules).
Breaking changes:
- JavaScript outputs is always scoped, never global
- Same counts for the concatenated files
- Outputs a flat structure. If the source file is in
sub/sub/sub/a.jsit outputs ->dist/js
Progress:
- [ ] Documentation
- [ ] Check if https://github.com/rollup/stream could simplify the integration.. 😅
- [x] Support
gulp watch - [x] Add Rollup bundling
- [ ] Update tests
Do we even need js-concat, since we can now merge the files with the import (can we, not sure?)?
We can't keep https://github.com/Intracto/buildozer/blob/12484be46ff93c4e978e7521cac9edb8848c858c/lib/.buildozerrc#L21-L23 since this will generate a separate js file for each js file. Thoughts on changing this to:
js:
- src: js/**/index.js
dest: dist/js
Small follow up. Did not have much time last couple of months. Planning on picking this back up soon.