node-oracledb/package
Christopher Jones e7be720a2f Change message grammar now 4.x binaries can be used by multiple Node versions 2019-07-24 17:32:23 +10:00
..
README.md Refactor to use N-API instead of NAN 2019-07-24 17:32:19 +10:00
buildbinary.js Change message grammar now 4.x binaries can be used by multiple Node versions 2019-07-24 17:32:23 +10:00
buildpackage.js Tweak packaging to suit last minute .npmignore changes 2019-01-24 10:52:15 +11:00
install.js Refactor to use N-API instead of NAN 2019-07-24 17:32:19 +10:00
prunebinaries.js Be more selective on binary file pruning 2019-01-17 11:40:51 +11:00

README.md

Overview

This directory is used for building the node-oracledb npm package. The scripts can also be used to create custom packages for hosting on a local server.

Most users do not need to use anything in this directory.

Maintainers

In a clone or copy of the repository:

  • npm run buildbinary calls buildbinary.js to create a node-oracledb binary for the current operating system.

  • npm run buildpackage calls buildpackage.js to make the node-oracledb package containing the node-oracledb JavaScript files, the available binaries, and a package.json that has an install script and a prune script. The package will be created in the top level directory.

    Before executing npm run buildpackage, all node-oracledb binaries and related build metadata information files from all operating systems should be placed in the package/Staging directory.

Package Installation

  • As part of an npm install that uses the created package, the package.json install script runs install.js to check a binary module for the current Node.js and operating system is available.

    If a suitable binary is not available, installation will fail. Users must then compile node-oracledb using source code from GitHub. Alternatively a different version of node-oracledb, Node.js, or different operating system may have a suitable pre-built binary available.

  • After install, space conscious users can run npm run prune which removes pre-built binaries for all other operating systems.

By default the top level package.json doesn't have an install script target. This means that node-gyp will be invoked to compile node-oracledb. This allows installation from source code (via GitHub) when no suitable pre-built binary is available.