max-mapper / yo-yo

A tiny library for building modular UI components using DOM diffing and ES6 tagged template literals
1.33k stars 65 forks source link

Publish dist global version for use in npmcdn #38

Open marshallswain opened 8 years ago

marshallswain commented 8 years ago

For making quick demos, it would be nice to be able to use this directly in a script tag.

On a related note, I made a standalone version by running browserify -r yo-yo > yo-yo.js. I expected to find it available as either window.yo or window.yoyo, but those are undefined. What is the expected usage for a standalone build?

ahdinosaur commented 8 years ago

hey @marshallswain :smile:

What is the expected usage for a standalone build?

i think you want (from within this repo's working directory): browserify --standalone yo index.js > yo-yo.js.

more info on browserify standalone: browserify-handbook#standalone

marshallswain commented 8 years ago

Thanks @ahdinosaur that's just what I needed to get my feathers-chat demo to run. :)

giacomo-cosimato commented 8 years ago

thanks @ahdinosaur that should be in the docs I tried with browserify -r yo-yo > yo-yo.js as specified in the front page, but the resulting export was an empty object