fork this module to create/edit/deploy your own custom Tradle models
this assumes you already deployed Tradle MyCloud to AWS
- run
npm install
in this directory - load your deployment information by running
npm run init
. This will create a file called.env
The following sections are optional, e.g. if you don't have Custom Models, skip the custom models section. If you don't have custom styles, skip the Custom Styles section, etc.
See sample custom models in ./models-sample
. You can create your own in ./models
. Put each model in a separate json file where the file name is [yourModel.id].json (see ./models/my.custom.NameForm.json for an example)
Validate and build your models pack with npm run build:models
Note: do NOT edit ./models.json
directly as it will be overwritten by npm run build:models
Define your provider's style in ./style.json
(see ./style.sample.json). Style must adhere to the StylesPack model.
Validate your style with npm run build:style
Set your bot's configuration in ./conf/bot.json
(see ./conf/bot.sample.json).
Validate your bot's configuration with npm run build:botconf
If you have Terms and Conditions you want your customers to accept prior to interacting with your bot, add them in ./conf/terms-and-conditions.md
(see ./conf/terms-and-conditions.sample.md)
You can deploy your configuration to your local Tradle development environment running on your machine, or to your Tradle MyCloud running in AWS.
npm run deploy:local
Or if you only want to deploy a particular item:
- models:
npm run deploy:local:models
- styles:
npm run deploy:local:styles
- bot configuration:
npm run deploy:local:botconf
- terms and conditions:
npm run deploy:local:terms
npm run deploy
Or if you only want to deploy a particular item:
- models:
npm run deploy:models
- styles:
npm run deploy:styles
- bot configuration:
npm run deploy:botconf
- terms and conditions:
npm run deploy:terms
once you've customized things, you can load, build and deploy by running npm start
and follow the wizard down the rabbit hole to nevernever land
npm run init
: set up your.env
file, and (optionally) load your remote configurationnpm run mergemodels
: merges models from./models
with values in./values
and outputs./models.json
npm run validate
: validate your models and stylenpm run build
: merge + validate your models, validate your stylenpm run deploy
: deploy your models, style, bot configuration to your Tradle MyCloud's S3 bucketnpm run deploy:local
: deploy your models, style, bot configuration to your local Tradle development environmentnpm run deploy:models
: deploy your modelsnpm run deploy:style
: deploy your stylenpm start
: init, build and deploy