chaijs / chai-spies

Spies for Chai Assertion Library.
MIT License
132 stars 29 forks source link

chore(build): replaces folio with rollup #77

Closed stalniy closed 7 years ago

stalniy commented 7 years ago

Also rebuilds browser version

Fixes #76

stalniy commented 7 years ago

@keithamus do you have a chance to look at this change?

keithamus commented 7 years ago

Hi @stalniy thanks for this awesome PR!

I like the idea of using rollup; so Im happy to get this one merged. I want to ensure we stick to a convention across all chai projects though; initially this took the form of browserify (see, for example, deep-eql: https://github.com/chaijs/deep-eql/blob/96ad468e8323de82d9e1c5cc2ac7bdf8fb407ba6/package.json#L26-L38).

Let's get @chaijs/chai to weigh in on this. Should we convert wholesale to Rollup? Should we keep everything using Browserify for now?

stalniy commented 7 years ago

I'm not sure whether it will be possible to add a check for chai environment easily with browserify (with rollup I added kind of custom plugin which just search and replace the global statement). But I can try if you think it make sense to use browserify

keithamus commented 7 years ago

Nono, I think rollup is the right direction, but I want the core team to all agree, and we can take rollup as the new standard across all packages. If anyone has any reservations or objections then we will investigate further

meeber commented 7 years ago

No objections here

keithamus commented 7 years ago

Great to hear. In that case let's get this merged and look to introduce rollup into the other projects.

lucasfcosta commented 7 years ago

Hello everyone,

So, here's my 2 cents about this. Recently I've been doing a bit of research on Rollup, Webpack, Browserify and etc and I think we should indeed adopt a more "robust" and configurable bundler. I feel like browserify is excellent and it suits our needs, but given the fine-tuning options we have with rollup I definitely would like to adopt it.

Also I don't think webpack is a good idea because it has "too much" for us. We don't have static assets or anything like that, since we're a library, rollup seems to be the optimal choice.

Btw, here is a good post related to this. https://medium.com/webpack/webpack-and-rollup-the-same-but-different-a41ad427058c

tldr; LGTM