@machinat/script
v0.6.0
Published
Control conversation flow with programming language styled script.
Downloads
12
Readme
Script Module
Control conversation flow with programming language styled script.
Install
npm install @machinat/core @machinat/http @machinat/script
# or with yarn
yarn add @machinat/core @machinat/http @machinat/script
Docs
Check the Dialog Script document and the package reference.
Setup
Register the built script like this:
import Machinat from '@machinat/core';
import Script from '@machinat/script';
import BeforeSunrise from './scenes/BeforeSunset';
import BeforeSunset from './scenes/BeforeSunset';
import BeforeMidnight from './scenes/BeforeSunset';
const app = Machinat.createApp({
modules: [
Script.initModule({
libs: [
BeforeSunrise,
BeforeSunset,
BeforeMidnight,
],
}),
],
});