-
-
Notifications
You must be signed in to change notification settings - Fork 601
Description
I am now supporting easy integration w/ Electron for backbone-parse-es6 via JSPM / SystemJS and typhonjs-core-gulptasks. An Electron desktop demo version of the canonical TODOS app is available via electron-backbone-parse-es6-todos-improved.
Since Electron is a hybrid Node / browser environment Parse thinks it's running in Node though it can run perfectly fine in browser mode in Electron.
In CoreManager config.IS_NODE is set here on lines 113-115
If one changes this to the following then Parse will run in browser mode in Electron:
IS_NODE: (typeof process !== 'undefined' &&
!!process.versions &&
!process.versions.electron &&
!!process.versions.node),
Everything else works after that. I can't see a way of setting IS_NODE to false before ParseUser and ParseObject set module private variables based on IS_NODE. This occurs on import of Parse before any chance to invoke the API or access Parse.CoreManager is possible. IE one can't call Parse.CoreManager.set('IS_NODE', false); before affected areas of code run.
Can you recommend a way forward for allowing Parse to run in browser mode in Electron?