buildozer icon indicating copy to clipboard operation
buildozer copied to clipboard

Feature/rollup

Open gijsroge opened this issue 5 years ago • 2 comments

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.js it 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

gijsroge avatar May 25 '20 21:05 gijsroge

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

MartijnCuppens avatar May 28 '20 17:05 MartijnCuppens

Small follow up. Did not have much time last couple of months. Planning on picking this back up soon.

gijsroge avatar Jul 22 '20 10:07 gijsroge