Javascript Usage

This doc will help you use the Handoff javascript (typescript) library to build handoff into your existing build process.

Handoff exposes a node API, allowing you to build and run all of the Handoff processes directly from your existing typescript or javascript applications.

This is especially useful for creating custom transformers to produce new formats and files during the pipeline execution.

Get Started

  1. Run npm install --save handoff-app
  2. Add handoff to your code. Create handoff.ts
1import Handoff from "handoff-app"; 2 3const handoff = new Handoff({ 4 // You can customize the configuration here 5}); 6handoff.fetch();
  1. Build your typescript tsc
  2. Run your project node handoff.js

This will fetch all tokens, run the transformers, and output the data to the exported directory.

Creating a Custom Output

TODO: Show a more complex example customizing the output

Example Project

Here's a demo project you can check out to get started fast