Skip to content

Commit

Permalink
Readme: Note about native extensions, how to run/test (#134)
Browse files Browse the repository at this point in the history
Signed-off-by: Arjun Sreedharan <asreedharan@vmware.com>
  • Loading branch information
arjun024 authored Sep 28, 2020
1 parent 7811472 commit de6cedb
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,36 @@ file that looks like the following:
To package this buildpack for consumption:

```
$ ./scripts/package.sh
$ ./scripts/package.sh --version <version-number>
```

This will create a `buildpackage.cnb` file under the `build` directory which you
can use to build your app as follows:
`pack build <app-name> -p <path-to-app> -b <path/to/node-engine.cnb> -b build/buildpackage.cnb`

## `buildpack.yml` Configurations

The NPM Install buildpack does not support configurations using `buildpack.yml`.


## Run Tests

To run all unit tests, run:
```
./scripts/unit.sh
```

To run all integration tests, run:
```
/scripts/integration.sh
```

## Stack support

For most apps, the NPM Install Buildpack runs fine on the [Base
builder](https://github.com/paketo-buildpacks/stacks#metadata-for-paketo-buildrun-stack-images).
But when the app requires compilation of native extensions using `node-gyp`,
the buildpack requires that you use the [Full
builder](https://github.com/paketo-buildpacks/stacks#metadata-for-paketo-buildrun-stack-images).
This is because `node-gyp` requires `python` that's absent on the Base builder,
and the module may require other shared objects.

0 comments on commit de6cedb

Please sign in to comment.