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

ring-toolkit

v0.0.6

Published

All in one toolkit for web app development

Downloads

8

Readme

Ring Toolkit

One Ring to dev them all One Ring to test them One Ring to build them all And in the browser serve them

Ring Toolkit is an aggregator of Web Build tools, shared in a simple CLI wrapper for ease of use.

The tools selected and wrapped into Ring Toolkit allow all the steps of web-app development:

  • A development server and static server capabilities are provided through @web/dev-server
  • A test environment is provided through @web/test-runner
  • A build pipeline is provided through rollup
  • A dependency validator is provided through depcheck

Installation & Usage

You can install Ring Toolkit by running the following command:

npm i -D ring-toolkit
// Or if you are using yarn: yarn add -D ring-toolkit

This will install the Ring Toolkit CLI as well as all the wrapped tools.

You can then use Ring Toolkit for all the steps of your project:

// Launch a dev server with @web/dev-server
npx ring-toolkit dev
// Launch a test framework with @web/test-runner
npx ring-toolkit test
// Build your app with rollup
npx ring-toolkit build
// Serve your built app with @web/dev-server
npx ring-toolkit serve
// Check your dependencies with depcheck
npx ring-toolkit depcheck

You can also use the ring shorthand binary:

npx ring build
// same as npx ring-toolkit build

Each command can work as an alias for the underlying product, meaning that any CLI flag available for the product can be passed to the command:

// Launch rollup with a given configuration
npx ring-toolkit build -c my-rollup.config.js

Centralized configuration

Ring Toolkit uses a centralized configuration for your project. In order to keep this configuration modular, it uses a JavaScript config file, with the .mjs extension.

This file can either be ring-toolkit.config.mjs if you'd rather have a full name, or rtconfig.mjs for a shorter name.

The configuration should implement the following interface:

interface RingToolkitConfiguration {
  // Can use alias `@web/dev-server`,  'web-dev-server', 'wds'
  dev?: WebDevServerConfiguration | (() => Promise<WebDevServerConfiguration>)
  test?:
    | WebTestRunnerConfiguration
    | (() => Promise<WebTestRunnerConfiguration>)
  build?: RollupConfiguration | (() => Promise<RollupConfiguration>)
  serve?: WebDevServerConfiguration | (() => Promise<WebDevServerConfiguration>)
  depcheck?: DepCheckConfiguration | (() => Promise<DepCheckConfiguration>)
}

The configuration types are the following:

All fields are optional. If configuration for a tool is not given, Ring Toolkit will let the tool look for its configuration as if it was run in a standalone fashion.

Each field can either be a configuration object for the underlying tool (as would be provided in this tool's configuration file), or a function returning a Promise to the configuration object.

The Ring Toolkit configuration file should export this configuration as default:

export default {
  dev: {
    port: 3000,
    watch: true
  }
}

Thanks to this setup, it is possible to maintain a shared standardized configuration and use it across project to configure, in one line of code, the four underlying tools:

import { configShared } from '@ring-toolkit/config-shared'

export default configShared()
// Here we can pass any custom options for our shared configuration