-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide upgrade tooling for 1.x => 2.x #147
Comments
One note from a debug session with @kevingelion: if we move the |
I think it's wise to print a warning if we find a electron.js in the root. Automatically moving it comes with many risks and doing it manually forces the user to check for other problems as well. Regarding the electron forge dependency: can't we link to the branch in package.json while in beta? |
@pichfl can you elaborate on perceived risks re: moving electron.js? Hoping we can air out likely scenarios as part of this decision. Re: including in package.json: last time I tried that, it caused several problems with the forge install. That may have just been my env though; if you've had a different experience then that would be my preference too 👍 |
Relative paths as a single string would be quite easy to detect, but how about stuff like Re package.json: Will try when I'm back in the office. |
n.b. Updated items 2 & 3 in first msg per debugging with @kevingelion |
Note to self: we should also include a gitignore in ember-electron dir, to ignore contents of |
Note to self: consider including compilerc in ember-electron dir; will need to include it in default package.json copy-files |
@anulman sorry to bother you, but I would like to try previewing the 2.x/master code and am getting stuck. Could you explain the "nvm link" step mentioned above? Is |
@jacobq derp, that's supposed to be Also, electron build tools definitely take some time to install at first. 30+ minutes sounds longer than I've ever heard though. Can you let me / us know if using |
yeah... that's probably my fault. sorry! @jacobq clone
|
@kevingelion did you mean Also, the second |
Ahh, thanks for the help guys. That explains why it wasn't working. (Though I feel a bit sheepish for never having used |
@anulman the first regarding specifying the path, yeah it's probably a good habit to do. i only linked one instance of it so it automatically detects the path. @jacobq might be worth using |
@jacobq I've not seen the root privileges requirement before; could this be because you're using a global / sudo-installed version of node? |
@anulman that's probably why; my bad. I'll worry about fixing that later as it looks like it just wanted to write to a directory that's for node anyway. However, after going through all this I get the following error:
Looks like this is upstream: electron/forge#136 |
Indeed it does. Are you using yarn? |
@anulman Not on purpose, but I do have it installed on my system. I will try uninstalling it once (unless you know an easier / less drastic way). |
OK, uninstalling |
Nice! Glad to hear that worked out. One extra note (it burned me when making a demo app earlier): please make sure that .compilerc is included in your copy-files too |
If you want to use a local version of ember-electron, see my comment in #160 |
Sorry for my question, but how can I switch ember-electron to point to github:felixrieseberg/ember-electron? Thanks |
|
@debelop13 you can also adjust your |
Once #170 lands we should revisit this |
Realized the notes in the top comment were a bit out of date; just updated them. @parm-ameotech are you coming from a 1.x app? If so, please confirm:
Thanks! |
@anulman Thanks! for the reply but I make it work on linux machine. I think its better to use linux rather than windows. |
Hi! Upgrading from 1.0 to 2.0 I have problems with ES6.. There are 'requires' in my ember project.. like - require("electron").electron.webFrame.setZoomLevelLimits(1, 1); - I change it for: Then, build is successful but index.html is not showing, and in console i have this eror Uncaught Error: Cannot find module 'myproject/routes/index' And I don't understand why.. SOLVED: requireNode() instead of require() |
Upgrading from 1.x => 2.x will change two major expectations:
electron.js
should live inember-electron/main.js
(vs. main dir); andember-electron
config in package.json should be removed, and replaced with a JSON or JS file atember-electron/.electron-forge
, matching config spec from the electron-forge projectmain: electron.js
line from your package.jsonHigh-level, we ought to help users handle this with a blueprint. Options are as follows, please vote with the corresponding reaction emoji / comment with a comment:
ember g ember-electron
, detect a 1.x app by virtue ofelectron.js
living in the top-level dir; move electron.js; and automatically migrate the right variables in package.json;ember g ember-electron upgrade
, throw if it's not a 1.x app; move electron.js and automatically migrate the right variables in package.json; orember g ember-electron
, detect a 1.x app by virtue ofelectron.js
living in the top-level dir; warn user they are upgrading and link to instructions (and/or recommend usingember g ember-electron upgrade
?)FYI
Just ran through the flow with @kevingelion on
master
as of this writing; if you've got a 1.x project and would like to try running 2.x you can:rm -rf node_modules/
ember-electron
to point togithub:felixrieseberg/ember-electron
npm install
isleofcode/electron-forge
, check outfeat/make-platforms
,npm install
, thennpm link
it in your ember project folderember g ember-electron
The text was updated successfully, but these errors were encountered: