Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle and publish to Google Hosted Libraries #249

Open
appsforartists opened this issue Nov 22, 2018 · 2 comments
Open

Bundle and publish to Google Hosted Libraries #249

appsforartists opened this issue Nov 22, 2018 · 2 comments

Comments

@appsforartists
Copy link
Member

After views-dom is merged into core, it's worth investigating putting together a Rollup distribution and adding it to Google Hosted Libraries to make throwing open a Codepen with Material Motion really easy to do.

@appsforartists
Copy link
Member Author

It looks like Rollup is supported by Bazel:

https://blog.mgechev.com/2018/11/19/introduction-bazel-typescript-tutorial/

I'm a bit skeptical of using Bazel (even though I've experimented with adding it to this repo). I like that it's a supported toolchain, and that there could be overlap when mirrored into Piper. I don't know enough about how much mental overhead it adds when developing. (It does look like there's ts_auto_deps to automatically generate BUILD files.) It looks like code coverage is in progress, but not available yet.

My biggest hesitations are:

  • Does it increase contributor friction? Even if bazel itself is distributed on NPM, it still requires the JVM.
  • Does it paint us into a corner for how to distribute? My null hypothesis is that we should distribute individual JS files in /dist to allow authors' bundlers to handle tree-shaking/minification. I believe if we use Bazel, it's going to want us to distribute a single Rollup-processed file. I'm not sure how easy it is for downstream authors to tree-shake a bundled file vs. a bunch fo loose ones.
@appsforartists
Copy link
Member Author

I spent too much time today fighting pundle-dev, which has reminded me why I wanted to try Bazel in the first place.

appsforartists added a commit that referenced this issue Nov 30, 2018
Summary:
As explained in the README, the sharding of this library into packages is an artifact of the original approach (vend adaptors for various spring and view libraries).  Since then, we've standardized on `wobble` for springs and have leveraged `jss` to sidestep interacting directly with view libraries.  Therefore, I've folded `views-dom` into `material-motion` and merged `views-react` into `demos-react`.  Future commits will remove `views-react` entirely, instead using `jss` for the demos.

Combining `views-dom` into `material-motion` will enable us to ship a single dependency for use on sites like Codepen. (#249)

Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion

Tags: #material_motion

Differential Revision: http://codereview.cc/D3488
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant