Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gettour

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gettour

Getchat.me onboarding tour library that works with their autochats

  • 0.6.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

Gettour

Getchat.me onboarding tour library that works with their autochats

Events:

Gettour event system. to subscribe/unsubscribe to events use following methods:

gettour.on(eventName, callback);
gettour.off(eventName, callback);

To Dispatch events you can use gettour.dispatch:

gettour.dispatch('myEvent', { payloadParam1: 'payloadParam1Value' })

List Of system events

  • opened:on-click - On widget expand event while user click on icon
  • opened:auto - On automatic widget expand event
  • closed:on-click - On hide by clicking "X" icon event
  • closed:auto - On automatic widget hide event
  • chat-event:ga - Chatbot Google analytics event triggered

Files structure

CSS Files:

dist
    css
        styles.css
        styles.min.css
lib
    index.js // Compiled module entrypoint
    gettour.js // Same as lib/index.js
    gettour.min.js // minified version of gettour.js
src
    * // Source files are here

Features

  • Webpack 4 based.
  • ES6 as a source.
  • Exports in a umd format so your library works everywhere.
  • ES6 test setup with Mocha and Chai.
  • Linting with ESLint.

Docs

Process

ES6 source files
       |
       |
    webpack
       |
       +--- babel, eslint
       |
  ready to use
     library
  in umd format

Have in mind that you have to build your library before publishing. The files under the lib folder are the ones that should be distributed.

Getting started

  1. Setting up the name of your library
  • Open webpack.config.js file and change the value of libraryName variable.
  • Open package.json file and change the value of main property so it matches the name of your library.
  1. Build your library
  • Run yarn install (recommended) or npm install to get the project's dependencies
  • Run yarn build or npm run build to produce minified version of your library.
  1. Development mode
  • Having all the dependencies installed run yarn dev or npm run dev. This command will generate an non-minified version of your library and will run a watcher so you get the compilation on file change.
  1. Running the tests
  • Run yarn test or npm run test

Scripts

  • yarn build or npm run build - produces production version of your library under the lib folder
  • yarn dev or npm run dev - produces development version of your library and runs a watcher
  • yarn test or npm run test - well ... it runs the tests :)
  • yarn test:watch or npm run test:watch - same as above but in a watch mode

Readings

Misc

An example of using dependencies that shouldn’t be resolved by webpack, but should become dependencies of the resulting bundle

In the following example we are excluding React and Lodash:

{
  devtool: 'source-map',
  output: {
    path: '...',
    libraryTarget: 'umd',
    library: '...'
  },
  entry: '...',
  ...
  externals: {
    react: 'react'
    // Use more complicated mapping for lodash.
    // We need to access it differently depending
    // on the environment.
    lodash: {
      commonjs: 'lodash',
      commonjs2: 'lodash',
      amd: '_',
      root: '_'
    }
  }
}

Keywords

FAQs

Package last updated on 06 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc