d4h-typescript
Typescript library for accessing D4H
How to Consume
This library is not in NPM. As a result, you need to add it to your project locally. To do so, you have three options:
- Add the repository to the consuming repository as a Git submodule.
- Clone the repository locally.
- Copy the files locally, without maintaining a Git repository.
Regardless of which option you choose, you can add the package by running:
npm i /path/to/package/d4h-typescript/lib
Using a relative path will also work without issue.
Structure
The source code is broken into two main folders:
- lib
- test
The lib folder contains the actual package intended for consumption.
The test folder contains a simple test program that consumes the main package. This is not intended for unit tests, nor does it use any test framework. It is valuable as a validating and debugging tool as changes are made.
lib
The only available command is to build:
npm run build
The output folder is the built directory.
test
The available commands are:
- build:
npm run build - launch:
npm run launch
Build simply builds the test project, while launch both builds and runs it. If you've made changes to lib, be sure to build there first.