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

dist folder #347

Closed user471 closed 8 years ago

user471 commented 8 years ago

Why there isn't dist folder in latest releases?

anthonyshort commented 8 years ago

It gets built on prepublish to npm, so we don't need to keep the built files in the repo. Is there some reason you needed it?

user471 commented 8 years ago

Maybe I did something wrong.

npm build
browserify lib/index.js -o out.js

But the out.js doesn't have global deku object.

rstacruz commented 8 years ago

try npm install.

anthonyshort commented 8 years ago

@user471 is right, it won't give you the global, standalone version that way. We might need to make a standalone task that runs browserify src/index.js -s deku -t babelify -o dist/deku.js.

user471 commented 8 years ago

browserify src/index.js -s deku -t babelify -o dist/deku.js

It works. I think separate task would be useful

anthonyshort commented 8 years ago

Added it as npm run standalone

troch commented 8 years ago

Thought about rollup? It is better suited for publishing libraries than webpack or browserify (which themselves are better for building applications).

anthonyshort commented 8 years ago

I'd be ok with that, the tree shaking alone makes it awesome. If someone wants to just swap that out, go for it, I haven't actually used Rollup yet.

troch commented 8 years ago

Bundling to an IIFE is very good too instead of webpack or browserify exporting a variable but still having internal implementation of require. I'll make a pull request.