- NPM version 8.x or later
compile
- compiles the TypeScript sources to thelib
directoryclean
- removes all generated code, coverage, and documentation artifactsfull-clean
- runsclean
and removes the localnode_modules
directorytest
- runs the unit testscoverage
- runs the unit tests and gathers coverage metrics (results found incoverage
directory)coh-up
- starts a Coherence container for testing/developing againstcoh-down
- stops the previously started Coherence containercoh-clean
- removes the local imagedist
- creates a test distribution for inspection prior to publish
bin
- various shell scripts that will be called by npmetc
- contains the ProtoBuff .protoc files and other various filessrc
- TypeScript source files and related resourcestest
- contains the library test cases in plain JavaScript
- run
npm install
- this will install the necessary dependencies and compile the grpc artifacts - run
npm run compile
- this compiles theTypescript
sources
- run
npm run coh-up
- this starts a Coherence test Docker container. This instance exposes thegrpc
port1408
and exposes port5005
for java debugging of the Coherence instance. To view the JSON payloads being sent to Coherence, check the docker container log for the instance this command started. - run
npm run test
- this will run all unit tests. You may optionally run the tests individually via an IDE as long as the Coherence container mentioned in the previous step was started. - run
npm run coh-down
when testing is complete and the Coherence test container is no longer needed.
- Install
typedoc
globally:npm install -g typescript && npm install -g typedoc
- Run
typedoc
from project root. The Generated documentation will be available in thedocs
directory.
- Currently based on https://google.github.io/styleguide/jsguide#formatting
- Question: How do I use the library locally in another project for testing purposes?
Answer: First, run
npm link
within thecoherence-js-client
project to create a global NPM reference. then, from the project you want to use the library with, runnpm link @oracle/coherence
which will install the library for use with that project