npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@parachutehealth/chat

v0.10.1

Published

JavaScript chat widget

Downloads

1,267

Readme

chat

Build status

Goals

  • standalone (no external dependencies),
  • fast (close to vanilla js),
  • well tested (unit / integration / feature specs included)

How does it work?

The library uses rollup to bundle the dependencies into a single umd script. Internally it uses svelte to manage the interactions. The chat is highly interactive so it should be data driven.

Suggested reading:

  • https://rollupjs.org/
  • https://svelte.technology/guide
  • https://github.com/GoogleChrome/puppeteer

Installation

npm install @parachutehealth/chat

Download chosen sdk from https://api.zopim.com/web-sdk/#downloads and put inside of your app.

Usage

import Chat from @parachutehealth/chat
import Service from @parachutehealth/chat/build/service
import sdk from 'your-sdk-location'

const service = new Service({
  key: 'ZENDESK_ACCOUNT_KEY',
  storage: sessionStorage, // any storage with setItem/getItem/removeItem API
  sdk
})
const chat = new Chat({
  data: {
    brand: 'Your brand',
    logo: 'your-logo-path.ext', // 48x48px
    messages_limit: 200, // max number of displayed messages
    sounds: {
      message: ['your-sound-path.ext']
    },
    ...service.data()
  },
  service
})

Development

If you're starting from scratch, install the dependencies first:

npm install
  1. Download version 1.4.0 of the sdk from https://dev.zopim.com/web-sdk/1.4.0/web-sdk.js and save it at test/assets/sdk.js

    curl https://dev.zopim.com/web-sdk/1.4.0/web-sdk.js > test/assets/sdk.js
  2. Set your ZENDESK_ACCOUNT_KEY in the .env file.

    This can be found by creating a free trial account on zendesk.com. Click on the profile icon in the upper right and choose "Check connection". The account key will be the second item in the modal.

  3. Run the following commands.

    npm run watch --silent
    npm run test:watch --silent
    npm start --silent

It'll start a test server available on port 8000.

By default the specs are ran in a headless mode, to disable it pass:

{ browser: { headless: false } }

To Page in feature specs.

Publish

You need to update the version of the lib first, consider using one of the following:

npm version patch
npm version minor
npm version major

After that, log in as a parachute dev and publish the package.

npm login # ask for credentials in #dev-chatter
npm publish