简体   繁体   中英

What is the best way to make Angular project as execuatable file?

I am working on a project which uses MEAN stack. Since this project will be deployed on client system, we want to make Angular part as executable (.exe) file. We have already made Nodejs part executable by using 'pkg'. The intention behind is to make it easy to execute and complete code is not visible to the client.

For the executable part (eg running as a desktop app), Electron might be a good choice: https://electronjs.org/

As for hiding the code, you could probably use a code obfuscation tool (eg https://obfuscator.io/ ). But in general, it's pretty difficult to hide JavaScript code. See this answer for more detail.

I would definitely look into using an Electron & Angular boilerplate: https://github.com/maximegris/angular-electron

In terms of obfuscation I just made an npm package that obfuscates and minifies the code in a package so that electron can properly build it. https://www.npmjs.com/package/directory-obfuscator

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