Source Code Directory Structure
The source code of Electron is separated into a few parts, mostly following Chromium on the separation conventions.
You may need to become familiar with Chromium's multi-process architecture to understand the source code better.
Structure of Source Code
Structure of Other Directories
- script - Scripts used for development purpose like building, packaging, testing, etc.
- tools - Helper scripts used by gyp files, unlike
script, scripts put here should never be invoked by users directly.
- vendor - Source code of third party dependencies, we didn't use
third_partyas name because it would confuse it with the same directory in Chromium's source code tree.
- node_modules - Third party node modules used for building.
- out - Temporary output directory of
- dist - Temporary directory created by
script/create-dist.pyscript when creating a distribution.
- external_binaries - Downloaded binaries of third-party frameworks which
do not support building with
Keeping Git Submodules Up to Date
The Electron repository has a few vendored dependencies, found in the
/vendor directory. Occasionally you might see a message like this
$ git status modified: vendor/brightray (new commits) modified: vendor/node (new commits)
To update these vendored dependencies, run the following command:
git submodule update --init --recursive
If you find yourself running this command often, you can create an alias for it
[alias] su = submodule update --init --recursive