2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								# Boilerplates and CLIs
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-21 16:19:21 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								Electron development is unopinionated - there is no "one true way" to develop,
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								build, package, or release an Electron application. Additional features for
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								Electron, both for build- and run-time, can usually be found on
							 
						 
					
						
							
								
									
										
										
										
											2018-03-02 10:41:55 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								[npm ](https://www.npmjs.com/search?q=electron ) in individual packages, allowing developers to build both
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								the app and build pipeline they need.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								That level of modularity and extendability ensures that all developers working
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								with Electron, both big and small in team-size, are never restricted in what
							 
						 
					
						
							
								
									
										
										
										
											2018-02-21 10:12:19 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								they can or cannot do at any time during their development lifecycle. However,
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								for many developers, one of the community-driven boilerplates or command line
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								tools might make it dramatically easier to compile, package, and release an
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								app.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								## Boilerplate vs CLI
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-05-08 00:16:09 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								A boilerplate is only a starting point - a canvas, so to speak - from which
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								you build your application. They usually come in the form of a repository you
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								can clone and customize to your heart's content.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								A command line tool on the other hand continues to support you throughout the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								development and release. They are more helpful and supportive but enforce
							 
						 
					
						
							
								
									
										
										
										
											2023-04-03 04:20:10 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								guidelines on how your code should be structured and built. _Especially for
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								beginners, using a command line tool is likely to be helpful_.
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-02 02:52:18 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								## Electron Forge
 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-21 13:49:22 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								Electron Forge is a tool for packaging and publishing Electron applications. It unifies Electron's tooling ecosystem
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								into a single extensible interface so that anyone can jump right into making Electron apps.
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-08-30 22:40:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								Forge comes with [a ready-to-use template ](https://electronforge.io/templates ) using Webpack as a bundler. It includes an example typescript configuration and provides two configuration files to enable easy customization. It uses the same core modules used by the
							 
						 
					
						
							
								
									
										
										
										
											2023-11-09 11:15:32 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
										 
									
								 
							
							
								greater Electron community (like [`@electron/packager` ](https://github.com/electron/packager )) – 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-20 09:47:18 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								changes made by Electron maintainers (like Slack) benefit Forge's users, too.
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-03-02 10:41:55 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								You can find more information and documentation on [electronforge.io ](https://electronforge.io/ ).
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								## electron-builder
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								A "complete solution to package and build a ready-for-distribution Electron app"
							 
						 
					
						
							
								
									
										
										
										
											2018-03-02 10:41:55 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								that focuses on an integrated experience. [`electron-builder` ](https://github.com/electron-userland/electron-builder ) adds one
							 
						 
					
						
							
								
									
										
										
										
											2018-02-21 10:12:19 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								single dependency focused on simplicity and manages all further requirements
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								internally.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								`electron-builder`  replaces features and modules used by the Electron
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								maintainers (such as the auto-updater) with custom ones. They are generally
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								tighter integrated but will have less in common with popular Electron apps
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								like Atom, Visual Studio Code, or Slack.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-03-02 10:41:55 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								You can find more information and documentation in [the repository ](https://github.com/electron-userland/electron-builder ).
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								## electron-react-boilerplate
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-05-08 00:16:09 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								If you don't want any tools but only a solid boilerplate to build from,
							 
						 
					
						
							
								
									
										
										
										
											2023-04-15 21:20:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								CT Lin's [`electron-react-boilerplate` ](https://github.com/electron-react-boilerplate/electron-react-boilerplate ) might be worth
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								a look. It's quite popular in the community and uses `electron-builder` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								internally.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-02-20 09:47:18 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								## Other Tools and Boilerplates
 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-03-02 10:41:55 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								The ["Awesome Electron" list ](https://github.com/sindresorhus/awesome-electron#boilerplates ) contains more tools and boilerplates
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 15:34:33 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								to choose from. If you find the length of the list intimidating, don't
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								forget that adding tools as you go along is a valid approach, too.