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

Use the electron-compile package instead of vanilla electron #28

Closed
lucbouchard1 opened this issue Jun 22, 2017 · 6 comments
Closed

Use the electron-compile package instead of vanilla electron #28

lucbouchard1 opened this issue Jun 22, 2017 · 6 comments

Comments

@lucbouchard1
Copy link
Contributor

The electron compile package allows for easier development with TypeScript. We were originally using it; however, I was having build issues that were solved when I installed the plain electron package. It should be changed back.

@lucbouchard1
Copy link
Contributor Author

@ddavidebor I did just think of a possible problem. We want to rewrite the render process in TypeScript, but the render process needs to be bundled by Webpack in order to use the JupyterLab API's (just a requirement of the JupyterLab design). Webpack doesn't play well with Typescript unless you use the Typescript loader, which just compiles the Typescript to Javascript before Webpack bundles it. This means we have to precompile the TypeScript anyway, and thus I don't think it makes sense to use electron-prebuilt-compile.

I guess we can still use electron-prebuilt-compile to compile the main process, but it seems for consistency reasons it might be better to precompile both into JS using the stock typescript compiler, bundle the render process, and then start the app.

Are there any benefits of using electron-prebuilt-compile beyond having things compile on the fly? Thoughts?

@ddavidebor
Copy link
Contributor

ddavidebor commented Jun 23, 2017

The benefits are mostly cleanliness and simplicity. Also less maintenance, due to bugs being squashed by the Electron community.

The main problem is the Electron environment moves quickly and things break just as quickly, so if there is a way to use the most widely supported and well-integrated tool it could be worth a few headaches.

If course using both i agree would be pointless.

@charnpreetsingh
Copy link
Contributor

I originally chose electron-prebuilt-compile for simplicity but since electron comes with it's own typings, it may be easier for configuring the typescript compiler through tsconfig.json, if we just stick with electron. I think the build problems @lucbouchard1 you were experiencing may be because electron-prebuilt-compile does not provide typings. I created an issue here but there has not been activity on the repo.

So I would argue to stick to regular electron for greater configurability/control

@ddavidebor
Copy link
Contributor

@charnpreetsingh 20 days withouth a reply does not inspire confidence... I think your proposal is the way to go

@ddavidebor
Copy link
Contributor

But in that case maybe in the future we can use gulp to automate the process of building, packing, launching etc etc and simplify all the various scripts.

@lucbouchard1
Copy link
Contributor Author

Sounds like we're not going to be using electron-prebuilt-compile. Closing this issue.

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

No branches or pull requests

3 participants