Skip to content
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

Fix electron build #1177

Closed
wants to merge 5 commits into from
Closed

Conversation

ylecuyer
Copy link
Contributor

Related to #1173

Electron changed some apis https://electronjs.org/blog/electron-api-changes

  • some update + cleaning

"min_width": 400,
"min_height": 200
}
"main": "electron/main.js"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this line, I think it may point npm commands to electron folder and may result difficulty in debugging as execution will not be in the public

I will need to read up more and test this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👍 this point is tricky. Electron Application Architecture guide (https://electronjs.org/docs/tutorial/application-architecture) says that electron runs the script present at main inside the package.json

I see 2 possibilities :

  1. Keep the configuration as it is with an electron specific file hidden in public/main.js (previous configuration)
  2. Make an electron folder to name things and mode public/main.js here to clearly states it is for electron (what I chose)

The rest of ungit always run the ./bin/ungit binary and is not affected by this change

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't done the packaging node projects and I'm not too certain on this matter but I think previous option makes more sense as how we package our app should not affect how the app should be built.

@@ -496,7 +471,7 @@ module.exports = (grunt) => {
grunt.registerTask('publishminor', ['default', 'test', 'release:minor']);

// Create electron package
grunt.registerTask('package', ['clean:electron', 'clean:babel', 'babel:electron', 'copy:electron', 'electron']);
grunt.registerTask('package', ['clean:electron', 'clean:babel', 'babel:electron', 'electron']);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We maybe conflating two PRs but we are doing babel for electron and removing babel in #1178.

We want to be consistent either keep babel and keep wider support or just remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is made to be merged before #1178 as it is simpler, in #1178 babel for electron is removed alongside babel for server.

@campersau
Copy link
Collaborator

Superseded by #1240
I included one of your commits in my PR.

@campersau campersau closed this Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants