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

repoir

v0.1.0

Published

If your repo needs a checkup, you should probably repoir it

Downloads

5

Readme

Repoir Build Status Coverage Status dependencies Status

Repoir = Repository report and repair

In the real world, developers are opinionated, forgetful, and tend to overthink basic file organization. Multiple this by x repositories and y developers and clouds of sadness rain down. Repoir is here to help. It's simple. Configure repoir. Run repoir to find issues. Run repoir --fix to fix issues. Then get back to coding something your future self will be proud of.

Repoir follows a plug-in architectue to allow you to re-use, create, and / or configure your own repository ruleset.

install

npm i -g repoir

usage

repoir

To fix issues.

repoir -f 
repoir --fix

To get help with cli uage, run the following.

repoir --help

configuration

There are three main ways to configure repoir.

#. You can provide plugins which establish new rules. #. You can configure rules that are provided by plugins. #. You can extend the configuration.

plugins

Repoir is based entirely off plugins. Without plugins, repoir does nothing.

Plugins should follow the npm naming convention of repoir-plugin-{name}.

To enable new plugins, you can add them to the plugins array in the configuration file.

"plugins": [
	"npm-scripts",
	"package-json-order"	
]

The interface to define your own plugin.

export const meta = {
    description: "lorem ipsum"
}

export const schema = {
    // schema for config options in .repoir.json
    // json schema?
}

export function test (options) {
    return new Promise((resolve, reject) => {
        // return a resolved or rejected promise to indicate status
        // somehow report messages
    });
}

export function fix (options) {
    return new Promise((resolve, reject) => {

    });
}

rules

Plugins are configured via _rules. If you don't define a ruleset for a plugin to follow, it will follow its default set.

extend

Finally,

ruleset

Rulesets are used by repoir to configure how it scans a project.

To provide your own ruleset, pass in a file with -r or --ruleset or place a .repoir config file in your project's root.

plugins

write your own

dependencies

Dependencies deal with checking the state of modules which are needed for your repo.

  1. check to see if dependencies are out of date
  2. check to see if dependencies haven't been installed
  3. check to make sure dependencies like webpack, jest, babel are in devDependencies

lint

For lint checking we want to check the following things.

  1. does npm run lint exist
  2. if we run npm run lint, do we get a style report
  3. if npm run lint doesn't product a report, does npm run lint:out
  4. read the report, are there errors?
  5. ensure an .eslintrc file is present and matches a pre-defined one in the ruleset

package.json

Will clean up package.json if necessary.

organize

Will alphabetize sort the package.json file and all sub properties.

script checker

This is for checking to make sure some basic npm scripts are in package.json and that they work.

  • build
  • clean
  • healthcheck
  • lint
  • test
  • test:coverage

webpack

Support for ensuring webpack config is consistent