This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 339
Build Napa.js
Yulong Wang edited this page Dec 27, 2017
·
5 revisions
Most of the time, there is no need to build Napa.js. When consuming Napa.js via npm install napajs
, npm will first try to download the pre-build binaries for the current platform. The following situations are when build will happen:
- using
npm install napajs --no-fetch
to specify a force build - current platform is not in supported pre-build platforms.
- you are using other platform rather than Node.js. See Build Napa.js for Electron.
- you want to build and test 'napajs' from source code. This is especially helpful when you have a combination of OS/compiler/Node version that is not explicitly mentioned as supported.
- Install C++ compilers that support C++14:
- Windows: Visual C++ Build Tools 2015 / 2017, or Visual Studio
- Linux: via Apt-get
- OSX:
xcode-select --install
- Install CMake:
- Linux: via Apt-get
- OSX: via brew
- Download or build
- Install cmake-js:
npm install -g cmake-js
- Add argument --no-fetch to the install command:
npm install --no-fetch
- Clone the source code
- Enter command line
- Enter the directory that napajs will be cloned in its sub-folder named 'napajs'
git clone https://github.com/Microsoft/napajs.git
- Run command
npm install --no-fetch
at the root directory of local repo.
Enter the root directory of local repo in command line.
- Run test:
npm test
- Run unittest:
npm run unittest