ibm-js / delite

HTML Custom Element / Widget infrastructure
http://ibm-js.github.io/delite/
Other
68 stars 28 forks source link

delite/handlebars.js and all its dependencies should be loadable in node.js #402

Closed clmath closed 9 years ago

clmath commented 9 years ago

delite/handlebars depends on delite/Template which depends on delite/register which depends on decor/schedule which is using window without checking if it exist first which prevent the build to load delite/handlebars.

This has happened before, see https://github.com/ibm-js/delite/issues/148 for more information.

wkeese commented 9 years ago

OK, but really this is an issue w/decor. decor/schedule should be updated to work in node. Actually, I thought it already did. @asudoh can you fix?

wkeese commented 9 years ago

PS: I'm surprised to see this report because I thought the decor tests ran in Node.

asudoh commented 9 years ago

Guessing @clmath is using node.js 0.8, where setImmediate() is not available. Create a PR adding process.nextTick() support to decor/schedule to cope with that. Also - setImmediate() runs after painting, etc. stuffs happens, whereas end-of-microtask queue like process.nextTick() and Mutation Observer callbacks runs before painting, etc. stuffs - Which means process.nextTick() is much closer to Object.observe() spec than setImmediate() is.

clmath commented 9 years ago

Thanks @asudoh for your quick response. Following @wkeese suggestion I will open a new issue in decor to track the progress on this. You will find my answer to your comment there.

clmath commented 9 years ago

I opened https://github.com/ibm-js/decor/issues/45