twitter / hogan.js

A compiler for the Mustache templating language
http://twitter.github.io/hogan.js
Apache License 2.0
5.14k stars 431 forks source link

CDN file for browser #200

Open pensierinmusica opened 10 years ago

pensierinmusica commented 10 years ago

Hi,

In your homepage you mention:

Alternatively, drop hogan.js in your browser by adding the following script. <script src="http://twitter.github.com/hogan.js/builds/3.0.1/hogan-3.0.1.js"></script>

On the other hand, including that script directly in the browser causes an error ("Uncaught ReferenceError: require is not defined" @ hogan.js:18).

Taking a look at hogan.js, one finds this comment:

// This file is for use with Node.js. See dist/ for browser files.

It looks like you'd expect the developer to download the npm package, compile it and reference the dist version. But, what if one would prefer to use a CDN and simply link the correct file from an external source instead? Would it be possible to have the original link on your homepgae fixed?

Thanks for looking into this, cheers!

tunnckoCore commented 9 years ago

It have cdn https://cdnjs.com/libraries/hogan.js

@fat @sayrer , here must point that v3.0.2 missing in gh-pages branch.

tunnckoCore commented 9 years ago

But yea, repo organize is little confusing also for me.