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

nodecg-io-cli

v0.5.0

Published

The CLI to install and manage nodecg-io installations. Also helps you with nodecg-io bundle related development.

Downloads

8

Readme

nodecg-io-cli

This is the CLI for nodecg-io that allows you to easily manage your nodecg-io installation and helps you with nodecg-io related development.

Table of contents


Commands

Here's a brief overview of the available commands. More in-depth usage guides of these commands will be available in the nodecg-io docs at some point.

nodecg-io install

Installs nodecg-io to your current NodeCG installation into a subdirectory called nodecg-io. Allows you to select which released version you want or if you wish to get a development install.

A production install fetches tarballs of the needed packages from the official npm registry, unpacks them, creates a package.json with all packages in a npm v7 workspace configuration and installs dependencies that way.

A development install clones the official git repository (main), installs dependencies builds all packages.

Either way at the end of the installation it will automatically add the nodecg-io directory (and samples if dev install and selected) to the bundles.paths array of your NodeCG configuration. If you don't have a NodeCG configuration it will create one for you.

If you later decide that you want to add or remove a service you can just re-run nodecg-io install. It saves your choices and makes them the default selected if you already have an installation, so you can make changes to them. If you re-run the install command it will also pull the repo and rebuild if necessary. In case of a development install and, in case of a production install, it will make any updates if some packages have a new patch version available. Updates of minor and major changes must be made explicitly by selecting the newer version when running the install command.

nodecg-io uninstall

Undoes everything that nodecg-io install did. It removes the nodecg-io directory with your installation and removes nodecg-io from your NodeCG configuration.

nodecg-io generate

Generates a new bundle in the bundles/ directory in your NodeCG installation. Allows you to decide on language (TypeScript or JavaScript), whether you want a dashboard/graphic and which services you want to use. Uses your installed nodecg-io version and services, meaning you need to have the services that you want to use installed.

These generated bundles are only meant as a starting point, you may probably do more things like creating a git repository for your bundle, add a licence, or add other tools like linters.

If you are using a released version of nodecg-io (aka. a production install) the nodecg-io packages get fetched directly from npm. If you are using a development version of nodecg-io these get fetched as tarballs from the nodecg-io-publish repository.

A note about versioning

This CLI follows and is versioned independently of the rest of nodecg-io like nodecg-io-core or the services.

The following table show which versions of the CLI are compatible with which nodecg-io versions:

| CLI versions | nodecg-io versions | | ------------ | ------------------- | | 0.1 | 0.1 | | 0.2-0.4 | 0.2, 0.1 | | 0.5 | 0.3, 0.2, 0.1 |

Developer workflow

Clone this repo, install the required dependencies and build it:

$ git clone https://github.com/codeoverflow-org/nodecg-io-cli.git
$ cd nodecg-io-cli
$ npm i
$ npm run build

Then link your current local installation of the CLI to your global node_modules directory (might require sudo on linux):

$ npm link

You can now use the nodecg-io command, and it will use your local install. You DO NOT need to rerun the link command after you make changes to the CLI, unless you move it another location. While developing you may want to start a TypeScript watcher by running npm run watch that will automatically update the JS files that are used while you make changes.