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

dogit

v1.0.1

Published

<p align="center"> <img width="100" src="./logo.svg"> </p>

Downloads

7

Readme

Read this in other language : English | 简体中文

Install

npm install -g dogit

Init

If you are using DOGIT for the first time in a project, run the following command to initialize.

dogit init

Then you get a configuration file calleddogit.config.js. It looks something like this:

module.exports = {
    "flow": {
        "plugin": "AddTag",
        "option": {
            "envs" : {
                "dev": {
                    "prefix": "xjzmy-dev-v"
                },
                "test": {
                    "prefix": "xjzmy-test-v"
                },
                "prod": {
                    "prefix": "xjzmy-prod-v"
                }
            }
        },
        "hook": {
            "before": [
                {
                    "plugin": "ReplaceFile",
                    "option": {
                    "path": "./build/version.js",
                    "replace": "module.exports = { version: '__$tag__' }"
                    }
                }
            ],
            "after": [
                {
                "command": "npm run changelog:__$env__"
                }
            ]
        }
    }
}

Process

Then you can begin to execute your own process with:

dogit flow

This command will read the configuration file and starts the task. As you can see from the configuration file, flow represents the tasks what we need to execute, and contains two types of flows

  • Shell scripts
  • Plugin

Plugin processes can contain their own hook subprocesses, so they end up in a tree structure.

Shell scripts

I believe everyone is familiar with shell scripts, like this:

{
  "command": "command"
}

Plugin

A plugin is essentially a built-in script that has the following features over a shell

  • Afferent configuration
  • Can execute own hook
  • Accepts the parameters of the upper flow
  • Parameters can be exposed to the subordinate flow

And in a different format than the shell

{
  "plugin": "AddTag", // Name of Plugin required
  "option": {}, // Plugin parameters optional  
  "hook": {}, // Hooks supported by the plugin (subflow) optional 
  "when": params => {} // Prerequisites for executing the plugin optional 
}

The currently supported built-in plugins are

For specific hooks and options supported by the plugin, step into the plugin directory to view the documentation

when parameter indicates the conditions under which the current flow executes

{
    "command": "npm run changelog:__$env__",
    "when": params => {
        return params.env !== 'dev'
    }
}

This means that the Changelog generation task should only be performed without the tag in dev .

i18n

The language of the tool itself can be switched with the following interactive command

dogit set