$ yarn add @lucidtech/las-sdk-browser
$ npm install @lucidtech/las-sdk-browser
$ yarn add @lucidtech/las-sdk-node
$ npm install @lucidtech/las-sdk-node
import { Client } from '@lucidtech/las-sdk-core';
import { ClientCredentials } from '@lucidtech/las-sdk-node';
import { readFile } from 'fs/promises'
const fileBuffer = await readFile('...path/file.jpg')
const credentials = new ClientCredentials('<apiEndpoint>', '<clientId>', '<clientSecret>', '<authEndpoint>');
const client = new Client(credentials);
const documentResponse = await client.createDocument(fileBuffer, 'image/jpeg');
This repo uses PNpm workspaces. Requirements: PNpm
To install PNpm:
npm -g install pnpm
Install dependencies
pnpm install
Build
pnpm run build
Run tests
pnpm run test
- Make changes.
- Run
npm run bump-patch
(bump-minor, or bump-major) to change version according to semantic versioning. - Create an entry for changes in CHANGELOG.md under a new version heading.
- Create pull request
- Merge pull request into master, then
git pull
from master branch to update local branch. - Run
npm run publish-packages
. This will first build then release all packages to NPM, assuming you are logged into npm with required privileges.