How to use the @botonic/core.Botonic function in @botonic/core

To help you get started, we’ve selected a few @botonic/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hubtype / botonic / packages / botonic-cli / src / commands / run.ts View on Github external
async run() {
    track('Run Botonic CLI')
    const { args, flags } = this.parse(Run)
    const path = flags.path ? resolve(flags.path) : process.cwd()

    //Build project
    await this.botonicApiService.buildIfChanged()
    this.botonicApiService.beforeExit()

    this.botonic = new Botonic(path)
    console.log(this.helpText)
    this.chat_loop()
  }
github hubtype / botonic / packages / botonic-cli / src / commands / webview.ts View on Github external
async run() {
    const { args, flags } = this.parse(Run)

    const path = flags.path ? resolve(flags.path) : process.cwd()
    const context = flags.context ? flags.context : ''

    this.botonic = new Botonic(path)

    this.botonic
      .getWebview(args.webview_page, context)
      .then((response: string) => {
        console.log(response)
      })
  }
}
github hubtype / botonic / packages / botonic-cli / src / commands / input.ts View on Github external
async run() {
    const { args, flags } = this.parse(Run)

    const path = flags.path ? resolve(flags.path) : process.cwd()
    const route = flags.route ? flags.route : ''
    const context = flags.context ? flags.context : ''

    this.botonic = new Botonic(path)

    this.botonic
      .processInput(args.input, route, context)
      .then((response: string) => {
        console.log(response)
      })
      .catch(err => {
        console.log('Error:', err)
      })
  }
}