简体   繁体   中英

Electron package, generated folder

I want to keep my generated windows app (trought angular code) to a specific folder. I already read the documentation about the command, so I do:

ng build --prod --output-path=dist/win/x64 && electron-packager . --overwrite --platform=win32 --arch=x64 --icon=src/assets/img/scm/logo.ico --out=dist/win/x64

And then, it generates the index.html and content under dist/win/x64 , but the windows application is generated under dist/win/x64/app-win32-ia32 .

I want to have the generated app ( dist/win/x64/app-win32-ia32 ) into the main path( dist/win/x64 ), because if not, it won't show any apps. What can I do?

tl;dr: I want to generate ng build and electron-packager on the same path without being /dir .

Really, I don't know how to do it with electron-packager built in functionality, but you can use a basic mv command.

ng build --prod --output-path=dist/win/x64 && \
electron-packager . app --overwrite --platform=win32 \
--arch=x64 --icon=src/assets/img/scm/logo.ico --out=./tmp && \
mv ./tmp/app-win32-ia32/* ./dist/win/x64 && \
rm -rf ./tmp

I would use either gulp or grunt for such tasks.

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