seamlessdocs-client v0.0.1
SeamlessDocs Client
Initial client setup
Install Node and Yarn
- If you're on OSX and you have
homebrew
installed:
$ brew install node yarn
- If you're on OSX and you have
There's a random thing you may need to do to make
nodegit
installable on OSX Sierra (see: https://github.com/nodegit/nodegit/issues/1124)$ sudo xcode-select --install
- Install dependencies
$ yarn login $ yarn
- Run the app:
- Run against stage backend (feel free to replace testforce with another domain):
$ SEAMLESSDOCS_ACCOUNT_KEY=testforce yarn start
- Or run against local backend:
$ yarn run with-local-api
Site will be served on https://localhost:3000
if available
Running tests
Run all tests:
$ yarn test
Run an individual test (e.g. test/epics/sampling.spec.js
):
$ yarn run test-only test/epics/sampling.spec.js
Adding & Updating Dependencies
Dev-Only Dependencies
$ yarn add $PACKAGE -D
Prod Dependencies
$ yarn add $PACKAGE
Uninstalling dependencies
In order to uninstall dependencies, run the following:
$ yarn remove $PACKAGE_NAME
This uninstalls and updates the package.json
file for both dev and prod packages.
Flow Typed
You can run flow-typed install
after a new package installation. This should be done with caution, and periodically, since it might override valid libdefs with a generic one. You can also periodically run flow-typed update
to download any libdef updates, verify that the project still typechecks, and the commit the updates.
IMPORTANT
These flow-typed
files are blacklisted and should not be commited to master:
rxjs
redux-observable
babel-*
webpack-*
eslint-*
NG Embed NPM Package (aka Wilson)
NG Embed is the npm package to embed NG into our legacy platform.
Local development
NG Embed offers two types of local development:
- Without having to embed the script into the legacy product: run your local server and visit
https://localhost:3000/embed
. Make sure you login first viahttps://localhost:3000/ng/login
if it requires authenticated calls - Embedding the script into the legacy product: run your local server and deploy a branch to your
yourname.nonprod.seamlessdocs.com
that turns onUSE_LOCAL_NG_EMBED_BUNDLE
in legacy. You might need to double click onembed.js
in the network tab to accept the self-signed https certificate.
Updating the package for production
This is only necessary for deploying changes to production, not local development. To update the package, do the following steps:
- If you haven't done so, create an account at www.npmjs.com and have one of the FE engineers add you to the SeamlessDocs org.
- Make, commit, and land changes to files in the
embed
dir. - Run
yarn run build-embed
. This will build the ng embed package intobuild-embed/build
. cd build-embed
- Bump version in
build-embed/package.json
. - Log into npm via
yarn login
. - Make sure your current directory is
build-embed
then runnpm publish
. - Commit and land version change.
- Bump version in SeamlessDocsAPI
package.json
.
NG Internal Tools
NG Internal Tools comprises of the following tools for internal use only:
- Tailor (Admin tool to update users, subdomains, and feature flags)
Local development
Run the scala server in private mode locally:
$ cd seamlessng/server/scala/lobby
$ export SEAMLESSDOCS_SET__SEAMLESSDOCS_SERVERTYPE="INTERNAL"
$ export SEAMLESSDOCS_SET__SEAMLESSDOCS_SESSION_VALIDISSUERLIST="https://seamlessdocsinternal.auth0.com/"
$ export SEAMLESSDOCS_SET__SEAMLESSDOCS_SESSION_ASYMMETRIC_BASE64ENCODEDMODULO="`curl -s https://seamlessdocsinternal.auth0.com/pem | openssl x509 -noout -modulus | sed 's/Modulus=//' | xxd -r -p | base64`"
$ sbt run
Run the client:
yarn run with-local-api
http://localhost:3000/internal-tools
Production build
yarn run build-internal-tools
4 years ago