4.0.1 • Published 3 years ago

nuxt-chatra-module v4.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

💬 nuxt-chatra-module npm npm bundle size

Simple Nuxt.js Chatra integration.

Installation

yarn add nuxt-chatra-module # npm i nuxt-chatra-module

Add chatra section with options to your nuxt.config.js,

check all options below, only id option is required.

Also you must add nuxt-chatra-module to modules section:

export default {
  chatra: {
    id: 'abcdefghijklmnopq'
  },
  modules: [
    'nuxt-chatra-module'
  ]
}

Options

To customize your chatra, you must use setup option:

// nuxt.config.js
export default {
  chatra: {
    id: 'abcdefghijklmnopq',
    setup: {
      // ...
    }
  }
}

To check, what setup options is available go to api reference.

Methods

You can call chatra methods directly from Vue instances, components/OpenChatBtn.vue:

<template>
  <button @click='openChat'>Open chat</button>
</template>

<script>
export default {
  methods: {
    openChat () {
      this.$chatra.openChat()
    }
  }
}
</script>

All methods are in this.$chatra space, to check all supported methods, go to methods api reference.

TODO

  • Support all methods from api
  • Unit testing
  • Yarn PnP
  • Full documentation

Development

This package use yarn workspaces. It's just to separate nuxt testing dev space and our module.

You can make changes by:

# git clone
cd nuxt-chatra-module
yarn
# provide chatra id and start nuxt dev server
CHATRA_ID=abcdefghijklmnopq yarn dev
# change something in packages/nuxt-chatra-module
git commit .

License

MIT.

4.0.1

3 years ago

4.0.0

3 years ago

3.0.0

3 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago