简体   繁体   中英

Angular2 CLI with electron

I am trying to set up an Angular2 CLI project in electron and am not quite sure where to start after getting the basic Angular piece generated by the CLI set up.

I have used Angular2 with electron successfully before, but that was not with the CLI piece.

So, for clarification, I have generated the basic Angular2 App using the Angular2 CLI. Now I am unsure of how to wire it up with Electron.

Has anyone done this before? Maybe you could provide some insight. Any tidbits of help will be greatly appreciated.

Thanks!

just figured I'd let you all know the solution I found. Turns out when you do an ng-build using the CLI it is completely dropping the dist folder and then remakes it using the src folder. This means it gets rid of the main.js, renderer.js, and package.json electron needs which are stored in the dist folder.

In order to ensure the Electron files (main.js, package.json, and renderer.js) get carried over to the Dist folder each time I use ng build, I set up a task using GulpJS to copy them to the correct location. Anyways, hope this helps anyone facing the same issue!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM