Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Merge bundling Browser examples #1817

Closed
daviddias opened this issue Jan 14, 2019 · 6 comments
Closed

Merge bundling Browser examples #1817

daviddias opened this issue Jan 14, 2019 · 6 comments

Comments

@alanshaw
Copy link
Member

How do you mean merge? Put in a directory like this?:

/examples/bundling-for-browser/browserify
/examples/bundling-for-browser/parceljs
/examples/bundling-for-browser/webpack
/examples/bundling-for-browser/script-tag

@daviddias
Copy link
Member Author

My proposal was more on

  • One single app example
  • One single package.json
  • Multiple npm scripts, one for each bundler
  • Readme that explains what it is, and which npm script is for which bundler
  • remove all the effort of updating 4 individual apps to just update one single app

@daviddias
Copy link
Member Author

As a bonus. We can add as part of the tutorial how to see the size of the final bundle and compare (time spent x bundle size) and explain why we use WebPack ourselves for dist vs all the others.

@achingbrain
Copy link
Member

If each bundler is a separate example, I think people will take the package.json contents from the example that features the bundler they want to use as a starting point for their own projects.

If all the bundler examples are bundled (!) into one example, it would be harder to look at the package.json and say 'this is the minimum set of deps I need for my project' which adds friction to that usecase.

@alanshaw
Copy link
Member

I think there's a huge amount of value in the copy/paste-ability of an individual example. Combining them into one will remove that - like @achingbrain said you'd have to figure out what dependencies and config applies to which bundler and that's not something I want to push onto developers trying to use js-ipfs.

Another potential hurdle: I don't know for sure if it'll be possible i.e. conflicting dependencies and .babelrc configuation

@daviddias
Copy link
Member Author

Understood. Thanks for reviewing the proposal, dropping it based on feedback.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants