shellyln / vue-electron-typescript-quickstart

A boilerplate of Electron app that uses Vue in TypeScript.
30 stars 7 forks source link

Confused about directory structure. #8

Closed SmashingQuasar closed 4 years ago

SmashingQuasar commented 4 years ago

Hey!

First of all, you are a lifesaver. I was pulling my hair trying to make this combo work until I found your boilerplate. Thanks a lot!

Now I am confused about three directories. I don't understand what are src.mainproc and src.preload. It looks like src.mainproc is the Electron code and src is Vue.

Could you clarify the difference between src.mainproc, src.preload and src, please? Are they separated for compilation purposes? If so, how can I use Vue components in Electron code? This is mostly when communicating through ipcRenderer.

Thanks!

shellyln commented 4 years ago

Hi, @SmashingQuasar !

Please see documents (1) (2) (3).

shellyln commented 4 years ago

You can use Vue only in Electron renderer process (src/) codes.

SmashingQuasar commented 4 years ago

Thanks a lot that clarifies things!

Just one last question, what's the use for the bin directory?

Thanks!

shellyln commented 4 years ago

bin/ is output directory for building src.mainproc, Please see webpack.mainproc.config.js.