Skip to content

Commit

Permalink
doc: add builtin module in building.md
Browse files Browse the repository at this point in the history
Fixes: #12516
Refs: #2497

PR-URL: #17705
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Suixinlei authored and evanlucas committed Jan 30, 2018
1 parent 1ef8f4e commit 926467a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,26 @@ and [user guide](https://openssl.org/docs/fips/UserGuide-2.0.pdf).
`/usr/local/ssl/fips-2.0`
8. Build Node.js with `make -j`
9. Verify with `node -p "process.versions.openssl"` (for example `1.0.2a-fips`)

## Building Node.js with external core modules

It is possible to specify one or more JavaScript text files to be bundled in
the binary as builtin modules when building Node.js.

### Unix / macOS

This command will make `/root/myModule.js` available via
`require('/root/myModule')` and `./myModule2.js` available via
`require('myModule2')`.

```console
$ ./configure --link-module '/root/myModule.js' --link-module './myModule2.js'
```

### Windows

To make `./myCustomModule.js` available via `require('myCustomModule')`.

```console
> .\vcbuild link-module './myCustomModule.js'
```

0 comments on commit 926467a

Please sign in to comment.