简体   繁体   中英

How to create extensible Electron applications?

Atom and Visual Studio Code are probably the biggest Electron apps so far and they're both quite extensible, and the are other smaller examples like N1 . By extensible I mean, they support plug-ins.

The problem is: I thought I would find something on Google on how to make an Electron app extensible, or something on those cool "awesome" lists, but I found nothing. Besides, digging into these apps source-code would take a while.

What I'm looking for (OR):

  • A built in feature that I'm not aware of
  • A library like electron-extensible (fake name)
  • A guideline

So, how do I make an Electron application extensible?

If you're the one writing the app, would be the one to create the layout/conventions used in the plugins.

That being said there are many ways you could do that, one being dynamicly require statements for substitute functionalities.

Coming from an OO background, I would recommend looking into Factory and Conposite design patterns.

Here are some electron resources: https://github.com/sindresorhus/awesome-electron/blob/master/readme.md

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