4.0.28 • Published 2 years ago

@trulioo/global-gateway-image-capture-web-sdk-beta v4.0.28

Weekly downloads
-
License
-
Repository
bitbucket
Last release
2 years ago

GlobalGateway Image Capture Web SDK

This sample app contains the Acuant SDK with the HTML Sample App wrapper.

This README document is for developers only and will get removed automatically when prepping the sample app for production release.

Dev environment setup

Inside the repo root directory:

  1. Create .env file:
  • cp .env.template .env to create a new .env file with this content:
SDK_USERNAME=                   // Acuant SDK username credential
SDK_PASSWORD=                   // Acuant SDK password credential
PORT=                           // Port on which to run the application. If blank, the port will default to 3000
ARTIFACTORY_DEVOPS_USER=        // JFrog username
ARTIFACTORY_DEVOPS_PASSWORD=    // JFrog password
NPM_TOKEN=                      // NPM token for nexus.rnd-trulioo.com/repository/npm-private
  1. Apply credentials to demo app:
  • After adding the credentials, run export $(cat .env)
  • Then run the following commands:
sed -i -e "s|USERNAME_TO_REPLACE|$SDK_USERNAME|gi;s|PASSWORD_TO_REPLACE|$SDK_PASSWORD|gi" src-demo/app.ts

You should now see the change in src-demo/app.ts at username and password.

  1. Install dependencies and Acuant SDK:
yarn install
  1. Start local development of demo app:
yarn dev --port <xxxx>
  • dev server port defaults to 3000 if no --port specified
Build

Build for production:

yarn build

which includes:

  • yarn build:dist -- build distribution files
  • yarn build:lib -- build JS files for npm packaging
  • yarn build:types -- build definition files for npm packaging

Build for development:

yarn build:dev

Similar to yarn build but without production flag, the dist/ would include non-minified and sourcemap details.

Utils

Clean up built files/assets:

yarn clean

Lint code in src and src-demo:

yarn lint

Apply code formatting for src and src-demo:

yarn format
Test

Run unit tests:

yarn test

which runs all tests in __tests__/ with pattern *.test.ts|js.

Run distribution

There are two options to run distribution build on your local machine and with docker.

Prerequisite: step '1. Create .env file' of section Dev environment setup.

Run on local machine

yarn install
yarn build
export $(cat .env)
./scripts/populateAcuantCredentials.sh
yarn start

Browse the output url, http://localhost:8080 by default.

Run with docker

docker-compose build
docker-compose up

Browse the output url, http://localhost:3000 by default.

4.0.28

2 years ago

4.0.27

2 years ago

4.0.24

2 years ago