7.8.0 • Published 4 years ago

bgtfs-node-lib v7.8.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Development

To generate the Xcode project do:

  • mkdir xcode_build
  • cd xcode_build
  • cmake -GXcode ..

This will generate the Xcode project inside the xcode_build folder

To run the tests: npm test

To compile the project: npm run make

You can speed up the compilation by using all the cores of your machine by replacing the script "make" in your packages.json by this:

"make": "./node_modules/.bin/ncmake configure & cd build & make -j 4"

and then run: npm run make

Releasing

To create a release of this lib and thus a pre-built version of the native library, you have to follow these steps. Please note that the steps require the Transit-Release (https://github.com/transitApp/release) project to be installed globally 1. Create a new release transit-release release patch|minor|major 2. Push the created tag (simply follow the instructions from transit-release)

After that point, Jenkins will build and upload a version of bgtfsNodeLib native library to be used on the server You can go in other project and update the bgtfsNodeLib dependency to point to the newly created release Deploying that other project will download the pre-built library and skip the c++ build step entirely.

Using bgtfsNodeLib in your project

In production, you don't need to have all the dependencies and build helpers to use this lib. You can execute a small script to remove all unnecessary files after you ran npm install

./node_modules/bgtfs-node-lib/production-slim-down.sh