@onec1/webchat-app
v3.5.33
Published
This project contains a typescripted React app, compiled by WebPack. The js assets are served from the [**WebChat API**](../widget-server-conversations).
Downloads
1
Readme
Webchat
Summary
This project contains a typescripted React app, compiled by WebPack. The js assets are served from the WebChat API.
See this diagram for information on how the WebChat constructs itself and gets customizable client assets from the WebChat API
WebChat Webpack Building
The WebPack config file is where the Typescripted React app is compiled, and js assets are created, then copied over to locations where they can be served from the WebChat API. This process is typically called by another process, for local development in the Makefile or in a dockerfile in deployed contexts.
However you can run the process manually by calling npx webpack
from this folder. See the config file for specific flags that can be added.
If you need npx is needed, run npm install -g npx
prior to running commands - however it comes standard with newer versions of node.
WebChat NPM Library
Creed publishes a version of the webpack to a private npm package to be consumed by the Admin Tool, package name "@creedinteractive/webchat-app"
When the data contract (Configuration or master props) of the WebChat changes, it is necessary to publish a new version.
Publish Steps
NOTE: In the WebChat project SCSS files need be added as a descendant of the same base folder 'src/styles' in order for the styles to work in another SCSS-enabled project.
You must be logged into npm as a user with access to this private package. See master readme for instructions on how to request access and log in to npm.
To publish, in the Makefile run the following commands:
A.
npm-lib build
to compile the react app and copy its styles and assets.B.
npm-lib.publish-patch
ornpm-lib.publish-minor
ornpm-lib.publish-major
depending on the changes to the data contract. This will update the version number accordingly on the pacakge, and publish it to Creed's npm repository.
Translations
If language values are changed in the ChatLanguage file of the WebChat, please refer to the translations readme for information on how to update translations accessed by the WebChat API.