Electron template and command line interface

Time:2021-9-2

ElectronThe development of is not very rigid, that is, development, compilation, packaging and releaseElectronNone of the application’s methods can be called “the only standard”.ElectronAdditional features related to compilation and runtime can usually be found innpmCan be found in a separate installation package, so that developers can compile applications and applications at the same time according to their own needsbuild pipeline

Template and command line interface

A template is like a blank canvas. We can build applications based on it. Generally, we can clone a template from a code warehouse and modify it to look like we want.

Command line tools can help us a lot in the development and distribution process, but they also have rigid requirements for code structure and construction projects. Command line tools are not useful for beginners.

electron-forge

Electron ForgeIt is used to build modernizationElectronPerfect tools for application.Electron ForgeYou can combine multiple existingElectronBuild tools are integrated into an easy-to-use toolkit that everyone can use to build quicklyElectronDevelopment environment.

ForgeIntegrate some popular frameworks into “out of the box” templates, such asReactVueAngularWait.Forge Some of the core modules come from the upper layerElectronCommunity, thereforeElectronSubmitted by main maintenance personnelElectronUpdates also makeForgeBenefit users.

The installation command is as follows:

npm install -g electron-forge

electron-builder

Electron BuilderIs a completeElectronApplication packaging and distribution solution, which is dedicated to the integrated experience of software development.electron-builderFor simplicity, a dependency has been added to manage all more requirements internally.

electron-builderWillElectronThe modules and functions used by maintainers (e.g. auto updater) are replaced with customized ones. The integration of components in the application packaged by electron builder will be higher, and there will be less common with mainstream electron applications.

The installation command is as follows:

npm install -g electron-builder

electron-react-boilerplate

If we don’t want to use any tools and want to simply start building from a template, we can use electron-react-boilerplate 。 It is very popular in the community and has been used internallyelectron-builder

Link:https://www.9xkd.com/