pugjs / pug-www

The website for Pug.
16 stars 12 forks source link

Why do we do this in development? #4

Closed ForbesLindesay closed 8 years ago

ForbesLindesay commented 8 years ago

https://github.com/pugjs/pug-www/blob/7e482bbfefd2de3007512fa846688dbfc3864368/src/components/pug-preview.js#L125-L128

It seems like either we want this everywhere, or not at all.

TimothyGu commented 8 years ago

We shouldn't do it at all.

The only case in which it is used so far is for demos that require a specific JS feature to be available in the browser. It is indeed a terrible hack, so I sought to limit the usage of the code to only Node.js by using NODE_ENV, which ended up being broken (and thus removed).