highland icon indicating copy to clipboard operation
highland copied to clipboard

'highland' object is no longer added to the global scope in the browser.

Open dayoadeyemi opened this issue 11 years ago • 7 comments

adding <script src="https://cdn.rawgit.com/caolan/highland/master/dist/highland.js" type="text/javascript"></script> doesn't seem to add the highand object to the global scope any more, where as <script src="https://cdn.rawgit.com/caolan/highland/2.5.1/dist/highland.js" type="text/javascript"></script> does

dayoadeyemi avatar Nov 16 '15 13:11 dayoadeyemi

That's possibly related to our recent upgrade of Browserify. I'll take a look.

apaleslimghost avatar Nov 16 '15 13:11 apaleslimghost

Should there be a minified version of the code in dist too?

svozza avatar Nov 16 '15 16:11 svozza

@svozza I don't think we've ever provided a minified dist.

vqvu avatar Nov 16 '15 20:11 vqvu

Yeah, that's what I thought but should we add one? Won't be much effort, I can do it now...

svozza avatar Nov 16 '15 20:11 svozza

Hmmm, slight problem. How can I run the unit tests against the minified code? If I try to run them against dist/highland.js on its own - never mind the minified version of that file - they fail. It's also slightly worrying that we can't be 100 per cent sure that our browserified code works as expected.

svozza avatar Nov 16 '15 21:11 svozza

Oh, yes. Adding a minified highland.js would be great.

Running browser tests: https://github.com/caolan/highland/blob/master/Contributing.md#running-the-tests

I don't see any errors. You have to make sure to rebuild test/bundle.js though. The version that comes with the repo is never updated.

vqvu avatar Nov 17 '15 05:11 vqvu

Yeah, that runs fine but technically we're not testing dist/highland.js with those tests (there's a TODO in browser.html about fixing this). I tried to get something working using rewireify but no luck. I guess it doesn't matter that much because Browserifying the unit tests is close enough in the dist/highland.js case but I'd be less confident about the minified version of the code.

svozza avatar Nov 17 '15 09:11 svozza