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

@knit/knit

v0.8.16

Published

Manage release of monorepo packages

Downloads

129

Readme

KnitCLI


Install

It is recommended that knit be installed as a local package using npm scripts but it can also work as a global package.

Global

yarn global add @knit/knit

Local

yarn add @knit/knit
// package.json
{
  ...
  "scripts": {
    ...
    "knit": "knit"
  }
}

Commands

list [options] [modules...]

This command will list out your modules with their dependency count and show whether you have missing packages you need to install:

yarn knit -- list

List

You can pass in module names to limit the scope of the search:

yarn knit -- list @myscope/header-component

ListModule

list -d, --dependencies

Passing --dependencies will expand the dependencies into a list to show you a more detailed view of your modules:

yarn knit -- list --dependencies

ListDep

list -u, --updated

This command shows which modules have been updated since the last release. It considers modules that have updated dependencies to be updated themselves. For example if page-component depends on @myscope/body-component modifying @myscope/body-component will return:

yarn knit -- list --updated

ListUp

validate

This command is used to make sure the project configuration will work with knit and looks to make sure their are no missing or unused dependencies.

yarn knit -- validate

Validate

server

❯ yarn knit -- server
Usage: server [options]

start a dev server

Options:

  -h, --help           output usage information
  -p, --port <port>    set server port
  -h, --host <host>    set server host
  -r, --proxy <proxy>  set proxy uri

relay

❯ yarn knit -- relay
Usage: relay [options]

update relay schema

Options:

  -h, --help  output usage information

This command will call out to a GraphQL server to fetch its schema and save it locally. Useful for running query validation without a live server (tests, travis etc.)

version

❯ yarn knit -- version <version>
Usage: version [options] <version>

version updated modules

Options:

  -h, --help       output usage information
  -f, --force-all  version all modules. (will fail if version already released)

This will bump the version of all updated modules and tag and commit to git.

build

❯ yarn knit -- build
Usage: build [options]

build updated modules

Options:

  -h, --help       output usage information
  -f, --force-all  build all modules

The updated packages are built against commonjs, es6 modules and umd targets.

stitch

❯ yarn knit -- stitch
Usage: stitch [options]

stitch updated modules

Options:

  -h, --help       output usage information
  -f, --force-all  knit all modules. (will fail if version already published)

The updated dependencies are stitched together - all required dependencies and meta data are added to the module package.jsons.

publish

❯ yarn knit -- publish
Usage: publish [options]

publish updated modules

Options:

  -h, --help       output usage information
  -f, --force-all  publish all modules. (will fail if version already published)

This command does not commit anything to git and must be done on a tagged commit. All updated modules are publish to the npm registry and can be used by require, import, modern tree-shaking bundlers like webpack and rollup using jsnext:main and as script tags thanks to https://unpkg.com.

release

❯ yarn knit -- release  <version>
Usage: knit [options]

release updated modules

Options:

  -h, --help       output usage information
  -f, --force-all  release all modules. (will fail if version already published)

This command will run all updated modules through the full release process: version->build->stitch->publish and then push to git. If you would like to modify this work flow each step has been broken out into its own command for you to mix and match as needed.