botfuel-hermes-webchat-client
v2.6.7
Published
[![](https://data.jsdelivr.com/v1/package/npm/botfuel-hermes-webchat-client/badge)](https://www.jsdelivr.com/package/npm/botfuel-hermes-webchat-client) # Botfuel Hermes webchat client
Downloads
106
Readme
Botfuel Hermes webchat client
Installation
In order to deploy a Botfuel Hermes app on your website, you need to:
- create an account on the app,
- create a new app
- copy the code snippet
- paste it on your website
Distribution
We use the CDN of jsDelivr to distribute the webchat client code.
Publishing a new version
Versioning
We rely on Semantic Versioning for versioning the webchat client. The code snippet uses the latest version of the webchat client.
1. Update package version
According to Semantic Versioning standards:
- PATCH for backwards compatible bug fixes
- MINOR for new functionalities in a backwards compatible manner
- MAJOR for new functionalities that includes incompatible API changes
To update the package version:
npm version <patch|minor|major>
Don't forget to push the new version commit on GitHub.
2. Publish the new package version to jsDelivr
To publish the new package:
npm publish
Integration
To integrate the widget into a website put the following code at the end of the <body>
tag:
<script src="https://cdn.jsdelivr.net/npm/botfuel-hermes-webchat-client"></script>
<script type="text/javascript">
BotfuelWebChat.init({
websiteId: 'WEBSITE_ID',
});
</script>
Non-production environments
To use a non-production environment you'll have to define the two options serverUrl
and backendUrl
to define respectively the webchat server and backend to which the widget should communicate with.
Use the following code for the staging environment:
<script src="https://cdn.jsdelivr.net/npm/botfuel-hermes-webchat-client"></script>
<script type="text/javascript">
BotfuelWebChat.init({
websiteId: 'WEBSITE_ID',
serverUrl: 'https://botfuel-hermes-webchat-srv-s.herokuapp.com',
backendUrl: 'https://botfuel-hermes-backend-staging.herokuapp.com',
});
</script>
Icons
For icons we use a font of icons generated on Icomoon App.
To update the icon list:
- Go to https://icomoon.io/app
- Click the "Import icons" button
- Import the file
src/assets/fonts/selection.json
- Edit icons selection
- Once the selection is ready to be downloaded go to "Generate font" tab (bottom right)
- Click download and open archive
- In
src/assets/fonts/
replace font files (.eot, .svg, .ttf, .woff) and selection.json by the new files
Dates
Dates format and manipulations are handled using Date-fns.
License
See LICENSE.