Closed d-simon closed 8 years ago
(Tests are failing, I'm looking into it)
Funny. It seems Phantom <2.0 does not have bind
.
https://github.com/ariya/phantomjs/issues/10522
I added a bind method as a fill in for the missing bind. Test are running successfully now. Question is whether this (the whole log thing) belongs in the head. What do you think? @backflip
STOP BOTHERING US WITH PULL REQUESTS!
Having said that:
dev.js
which is included in layout.hbs
depending on the env
ironment. This way, we can easily remove this for production.bows
there by default.bind
polyfill specifically for PhantomJS since we need this in other situations, too. E.g. by injecting a phantomjs-polyfill.js
here: https://github.com/unic/estatico/blob/develop/gulp/js/qunit.js#L55How should we continue on this? We could create a feature branch where you could point this pull request to and we would take over from there. Or we go grab a coffee and have a look at it together.
I'm a bit short on time currently and I hate coffee. Sounds good?
Actually, I have something just like that in use already. Over here:
When I think about it, it might also be convenient to have a way to load the dev.js
in production for debugging purposes. This could be a simple js hook that checks for a query parameter (such as ?debug=true
). What do you think?
Edit: Of course the script file would have to be loaded synchronously. (Is that even possible?)
But coffee is good for you!
We usually use a log wrapper such as bows to wrap and namespace our logs. I implemented a simple console.log wrapper which keeps the linenumber and prepends all log messages with the current module name.
This allows two things:
noop
function in production environment or has a mechanism to disable logs with localStorage. (e.g. andlog)the global log wrapper can be replaced with a wrapper of choice (bows in our case)