You will need to add other modules to this boilerplate, depending on the requirements of your project. For example, you may want to add node-postgres to communicate with PostgreSQL database, or material-ui to reuse React UI components.
Please read the following section before installing any dependencies
This boilerplate uses a two package.json structure. This means you will have two
./package.jsonin the root of your project
./build/app/package.jsonrelative to the project root
package.json file to use#
Rule of thumb is: all modules go into
./package.json except for native modules, or modules with native dependencies or peer dependencies. Native modules, or packages with native dependencies should go into
- If the module is native to a platform (like node-postgres), it should be listed under
- If a module is
imported by another module, include it in
./package.json. See this ESLint rule. Examples of such modules are
- Otherwise, modules used for building, testing, and debugging should be included in
- See Electron Documentation - Using Native Node Modules to see how Electron uses native Node modules.
- See Node.js Documentation - Addons to see what are native Node modules.
For an example app that uses this boilerplate and packages native dependencies, see erb-sqlite-example.