Closed brzpegasus closed 9 years ago
I'd kinda like to fix this in Ember itself also. I believe there is an open issue in the Ember repo for it (can't recall from whom though).
@rwjblue Ah, yes, it must be this issue. Having it fixed in Ember would definitely be great. I wonder if in addition to verifying that process
exists, we should also verify that window
does not, before concluding we're in Node.
Sounds great, would you mind testing that out locally and submitting a pull request to Ember?
:+1:
Ember 1.13.x checks for the existence of
process
to determine if it is running in Node (probably for Fastboot). This can result in errors trying to load an Ember app in NW.js.Changes:
window.process
then restore it at the end.load
event would not guarantee to run when it should. The shim is now split between 2 scripts:shim-head.js
andshim-footer.js
, both of which are injected into the page via thecontentFor
hooks.vendor/node-webkit/*.js
blueprint files are no longer necessary and have been removed.reload.js
file was moved from the blueprint to the addon'sclient/node-webkit/
folder and will be managed entirely by the addon itself. The consuming app won't have a copy of it laying around.process.env.EMBER_CLI_NW = true
for all of its commands. This ensures that custom build steps only execute for the correct environment.