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

@livetiles/create-reach-plugin

v0.4.3

Published

CLI to build, develop and publish Reach plugins

Downloads

26

Readme

@livetiles/create-reach-plugin

Prerequisites

To develop your plugin, you need a Reach subscription. Preferably one where you're an owner (else you won't be able to publish your plugin).

If you don't have a subscription yet, you can create one for free.

Getting started

To create your custom plugin run the following command:

$ npx @livetiles/create-reach-plugin <plugin-directory-name>

Please note that the target directory must be empty. This will generate all files necessary to start developing your plugin.

To start the development server:

$ cd <plugin-directory-name>
$ npm run dev

This will open a new tab in your browser where a new navigation node "Custom plugin" will be inserted into the left-side navigation of Reach. A page refresh might be needed for the changes to be applied. This node shows the contents of the HelloWorld.tsx file in <plugin-directory-name>/src

You can checkout the parameters set within the definitions.json file. Some of the notable things you can change here are:

  • the location and type of the plugin
  • the component that is rendered for the plugin
  • the plugin route

If you make any changes to the HelloWorld.tsx file, these will be rendered in the browser but you will need to manually reload the page to see the changes.

The dev command ensures that any changes you make are only visible to you. Additional steps are needed to publish the changes.

Publishing your plugin

If you're happy with the state of your plugin you can stop the development server and proceed to publish the plugin.

You can publish the plugin in one of two ways:

  • run $ npm run publish-web

This will open a new tab where a notification toast allows you to review the plugin. If you have the appropriate permissions, you will also be able to publish it. Publishing the plugin will automatically write the changes to the dB, making the plugin available for all users within the subscription.

  • run $ npm run publish

This command requires an access token and will also write the changes to the dB and make the plugin accessible for all users.

You can see a list of all published plugins by navigating to /admin/plugins. Here you can edit and remove any published plugins. If you edit and save, the changes will be available to all users immediately.

Generating a notification Api Key for your plugin

You will need a special Api Key to send notifications. You can generate this key by running the following command:

  • run $ npm run generate-api-key

This command will open a dialog inside Reach where you will have to provide at least a Display name and optionally an expiry date. Make sure you save this token as you won't be able to get it back if you close the dialog.