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

gochenour

v1.17.4

Published

Get to know the man, the myth, the legend

Downloads

62

Readme

Welcome to the gochenour CLI!

This handy application offers a small collection of tools that are all run via command line using gochenour <keyword> or goch <keyword> for short. Features include:

About

gochenour --about
goch -a

This provides a brief bio of the author.

Clean up JavaScript tests

gochenour clean
goch ct

This command recursively removes comments, debug statements and test-specific 'describe', 'test', and 'it' methods from all test suites, beginning at the level of the file directory in which this command was invoked. For more details, consult the test suites in the 'cleanAllSuites' and 'cleanSingleSuite' directories. It then lists which files were checked for extraneous test block methods and render methods.

New AWS Lambda (NodeJS)

gochenour new-service                                       

Starting from the current directory from where this command is executed, this creates the folders and files, including the configs, that are used by a standard AWS Lambda-based microservice in NodeJS.

Convert px to rem in CSS files

gochenour --pixel-px                                       

Beginning at the current working directory, recursively combs through the current directory and all subdirectories to convert all rule sets that incorrectly use pixels to REM values in all CSS files. It then prints out all converted files to the console.

Alphabetize CSS rules and rulesets

gochenour sort-css                                          

Beginning at the current working directory, this recursively combs through the current directory and all subdirectories to alphabetically sort all rule sets and all rules within each rule set in all CSS files.

Copy testing boilerplate to clipboard

gochenour test ddt
gochenour test ddi
gochenour test d<integer>

This command, followed by any of its ensuing options, copies a piece of test suite boilerplate to your clipboard buffer, producing the following:

$gochenour test ddt
┌─────────────────────────────────────────────────┐
│The following has been copied to your clipboard: │
│                                                 │
│describe('GIVEN: ', () => {                      │
│  describe('WHEN: ', () => {                     │
│    test('THEN: ', () => {                       │
│      //                                         │
│    });                                          │
│  });                                            │
│});                                              │
│                                                 │
│                                                 │
└─────────────────────────────────────────────────┘

Copy tree command with JavaScript-specific flags to clipboard

gochenour tree   
┌─────────────────────────────────────────────────────────┐
│                                                         │
│ The following has been copied to your clipboard buffer: │
│                                                         │
│   tree -I "node_modules|coverage|.serverless|dist"      │
│                                                         │
│Press COMMAND+V to paste it into the terminal.           │
│                                                         │
└─────────────────────────────────────────────────────────┘

This command copies to your clipboard buffer a complex tree command that you can run as-is or add an additional subdirectory to specify where to display a tree. NOTE: This requires installation of the tree program, which may not work on Windows systems.

Copy the git command that deletes all local branches except main

gochenour shake

┌─────────────────────────────────────────────────────────────────────────────┐
│The following has been copied to your clipboard:                             │
│                                                                             │
│git branch | grep -v "main" | xargs git branch -D                            │
│                                                                             │
│Executing this command will delete all git branches on your computer's hard  │
│drive except the "main" branch.                                              │
└─────────────────────────────────────────────────────────────────────────────┘

This is very handy after merging a branch to main and when you are certain that all other local branches can be deleted. Particularly useful when prototyping.

Copy Vitest boilerplate to clipboard

gochenour vitest                                         
goch vi
┌────────────────────────────────────────────────────────────────────────────┐
│The following Vitest boilerplate has been copied to your system's clipboard:│
│                                                                            │
│import { describe, expect, test, vi } from 'vitest';                        │
│import {} from '';                                                          │
│                                                                            │
│describe('GIVEN: ', ()=>{                                                   │
│  describe('WHEN: ', ()=>{                                                  │
│    test('THEN: ', ()=>{                                                    │
│      //                                                                    │
│    });                                                                     │
│  });                                                                       │
│});                                                                         │
│                                                                            │
└────────────────────────────────────────────────────────────────────────────┘

This command copies to your clipboard buffer a commonly used string that imports Vitest methods. Handy for all Vitest suites.