anthonyshort / deku

Render interfaces using pure functions and virtual DOM
https://github.com/anthonyshort/deku/tree/master/docs
3.41k stars 130 forks source link

Add rollup for bundling #363

Closed troch closed 8 years ago

troch commented 8 years ago

Added rollup to the project for creating globals, AMD or UMD bundled (uglified or not). Thanks to @ashaffer for updating dift and bit-vector.

I've noticed you have budo in package.json: any reason to keep browserify, babelify and budo?

rstacruz commented 8 years ago

I've noticed you have budo in package.json: any reason to keep browserify, babelify and budo?

probably was there as an alternative to hihat.

anthonyshort commented 8 years ago

Budo is probably going to be used to run the examples. Seems like the nicest way to get them running, just a npm run example:basic and a browser window opens.

anthonyshort commented 8 years ago

Only thing I'm concerned about with using Rollup is the need for the extra config. Will that many people be using a standalone version? I'm not sure, but it seems like if you're using something like Deku, you're probably using npm or similar.

rstacruz commented 8 years ago

but it seems like if you're using something like Deku, you're probably using npm or similar.

If you're building something and using Deku via npm and compiles via Rollup, Rollup won't be able to eliminate dead code because the npm-published version is built down to use commonjs modules. (Though that can easily be remedied using 'jsnext:main': 'src/index.js', but I'm not exactly sure how this works.)

Not that it's much of a concern anyway: Deku has a ridiculously small API surface and dead-code elimination probably won't find anything even in the simplest of Deku apps :)

troch commented 8 years ago

@rstacruz jsnext:main was already configured.

It is true the vast majority of users will be npm based. People might want to include deku in a rollup bundle. Having it build with rollup can be useful for flagging any issues with imports, exports (including dependency ones).

troch commented 8 years ago

Closing for now