refactor: add 'npm run bootstrap', 'npm run build' (#14034)

* docs: update package.json and build docs

* fix build release

* address feedback from review

* whoops forgot one

* fix build script

* address feedback from review
This commit is contained in:
Shelley Vohr 2018-08-12 14:01:46 -07:00 committed by GitHub
parent b785f45852
commit c0959bd534
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 61 additions and 18 deletions

View file

@ -12,7 +12,7 @@ Follow the guidelines below for building Electron on Linux.
For a quick test, run the following script:
```sh
$ python ./script/tls.py
$ npm run check-tls
```
If the script returns that your configuration is using an outdated security
@ -71,9 +71,18 @@ the build project files. You must have Python 2.7.x for the script to succeed.
Downloading certain files can take a long time. Notice that we are using
`ninja` to build Electron so there is no `Makefile` generated.
To bootstrap for a static, non-developer build, run:
```sh
$ cd electron
$ ./script/bootstrap.py --verbose
$ npm run bootstrap
```
Or to bootstrap for a development session that builds faster by not statically linking:
```sh
$ cd electron
$ npm run bootstrap:dev
```
If you are using editor supports [JSON compilation database](http://clang.llvm.org/docs/JSONCompilationDatabase.html) based
@ -112,7 +121,7 @@ $ ./script/bootstrap.py -v --target_arch=arm
If you would like to build both `Release` and `Debug` targets:
```sh
$ ./script/build.py
$ npm run build
```
This script will cause a very large Electron executable to be placed in
@ -128,10 +137,14 @@ This will put a working distribution with much smaller file sizes in
the `dist` directory. After running the `create-dist.py` script, you
may want to remove the 1.3+ gigabyte binary which is still in `out/R`.
You can also build the `Debug` target only:
You can also build either the `Debug` or `Release` target on its own:
```sh
$ ./script/build.py -c D
$ npm run build:dev
```
```sh
$ npm run build:release
```
After building is done, you can find the `electron` debug binary under `out/D`.