@appcues/flow-builder-api-client v6.2.0
Flow Builder Api Client
The typedoc documentation for this client can be found here
Testing The Client Locally Before Publishing To NPM
If you'd like to test the client in another project prior to publishing it, you can use NPM's link command.
Make sure you are using the same versions of node in BOTH repositories (use whatever version is the lowest). You can switch to a specific version of node by running
nvm use NODE_VERSION.Once the node versions are in sync, run
npm run buildwhich will build the latest code in the dist folder. Then runnpm linkin this repository, which will create a local symlink for@appcues/flow-builder-api-clientto this repository. This symlink is created in nvm's folder for the specific node version you are using, which is why it's important that both projects are using the same version of node.Let's say you would like to test your local flow-builder-api-client in
Repository A. With your terminal opened toRepository A, runnpm link @appcues/flow-builder-api-client. Two ways to confirm this has worked is:
Your terminal will print out the symlink from Repository A --> your local flow-builder-api-client folder
You can view the node_modules/@appcues/flow-builder-api-client in Repository A which should reflect the latest local changes.
Once these steps are completed in order you should have the latest up to date version of your local flow-builder-api-client in the linked repo. Once you finish testing be sure to npm unlink on your repos
Updating the spec and client
- Make your changes to the spec file
- Rebuild the client with
npm run build - Update the
src/wrapper.tsto include the new client methods - Commit your changes to client (
src/gen_client/api.ts). This will run the pre-commit hook, which runs the test suite. - After test suite passes and the PR is approved, follow instructions below to version, merge and publish
How to publish to npm
Here are some steps you should follow to publish the flow-builder-api-client to npm
Version bump: can be done by running
npm version minorornpm version majordepending on the caliber of your change. Make sure commit this change to your branch before merging master so you can have this in the master branch when publishing.Merge Master: can be done by merging a PR through github. After merging be sure to
git checkout masterandgit pullin order to get the latest code in order to keep themasterbranch as the source of truth when publishing to npm.Publish: can be done by running
npm publish. NOTE: you must have anNPM_TOKENwith publishing rights
Once these steps are done in order you should have the most up to date version of flow-builder-api-client published on npm.
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago