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

@haaretz/htz-frontend-cli

v1.0.4

Published

yarn workspaces autocompletion for htz-frontend

Downloads

14

Readme

                        :DNMMMMMMMMN$.                       
                . =NMMMMMMMMMMMMMMMMMMMMD.                  
              .DMMMMMMMMMMMMMMMMMMMMMMMMMMMN..              
            ,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMD.            
          .NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM8           
         NMMMMMMMMNNMMMMMMMMMMMMMNNNNNNNNNNMMMMMMN.         
       .NMMMMMMMMM  ..NNMMMMMMMMM.      ..MMMMMMMMM~        
       MMMMMMMMMMMN     ,MMMMMMMM~      .:MMMMMMMMMM.       
      DMMMMMMMMMMMN        DMMMMMN        MMMMMMMMMMM..     
     .MMMMMMMMMMMM7           DMM. 8NNNNNNNMMMMMMMMMMN.     
     DMMMMMMMMMMMM.  .            NMMMMMMMMMMMMMMMMMMM      
     NMMMMMMMMMMMM   MMM,..        $MMMMMMMMMMMMMMMMMM.     
    .NMMMMMMMMMMMM  NMMMMMM~          +MMMMMMMMMMMMMMM.     
     DMMMMMMMMMMMMN NMMMMMMMNM..       . DMMMMMMMMMMMM.     
     .MMMMMMMMMMMMN .MMMMMMMMMMMN.        .MMMMMMMMMMN      
      NMMMMMMMMMMMD   ...  MMMMMMMMN      IMMMMMMMMMM.      
      .NMMMMMMMMMM~        MMMMMMMMMMMZ   .MMMMMMMMM$       
       .MMMMMMMMMM.        NMMMMMMMMMMMMM, NMMMMMMMD        
         NMMMMMMMI..........MMMMMMMMMMMMMMMMMMMMMNI         
          8NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN.          
          . DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN..           
              .NNMMMMMMMMMMMMMMMMMMMMMMMMMMMN               
                ..NMMMMMMMMMMMMMMMMMMMMMM8                  
                     .INMMMMMMMMMMMND

              H T Z - F R O N T E N D  C L I

@haaretz/htz-frontend-cli

yarn workspaces autocompletion for htz-frontend

This package provides a simple cli for easing the pains of working in a monorepo managed by Yarn Workspace. Its basic philosopy is to minimize typing to a minimum while maintaining clarity, as well as providing helpful suggestions through tab-completions. It is tested to work with bash, zsh and fish.

Installation

Install the package globally with npm:

npm install --global @haaretz/htz-frontend-cli`

or Yarn:

yarn global add @haaretz/htz-frontend-cli`

Setup

Once installed, a global htz command will be available in your path.

To configure your htz-frontend project directory and install shell completions, run htz --setup, which will open a short wizard that will guide you through the process.

If, for any reason, you would like to edit your config at any point in the future, the recommended way to do so is simply by running htz --setup again. Alternatively, you can manually edit $HOME/.config/htz/.htzrc.js.

Usage

Once set up you can run htz from anywhere on your system, and it will carry execute commands in the project. If you hit tab, it will also try and make helpful completion suggestions based your input.

See demo here:

asciicast

Global Repository Actions

When the first argument to htz is one of add, remove or run, the action in the following arguments will be executed in each and every package in the repository.

For instance, htz remove lodash will remove the lodash dependency from every package in the repository where it is installed. Similarly, add will install packages, and run will run a task defined in scripts property of the individual packages' package.json.

Package Specific Actions

When the first argument is a package name (sans the @haaretz/ scope prefix), the action in the following arguments will be executed in that individual package.

Package names are suggested as tab completion candidates, so htz htz-c-> will suggest htz-components, htz-css-tools and every other package that starts with htz-c as completion candidates.

In turn, once a packages is chosen, the tasks specified in the scripts property of its package.json will be offered as completion candidates. E.g., htz htz-theme sty-> will suggest styleguide and styleguide:theme as completion candidates.

add and remove are also suggested, and remove is followed by all installed dependencies (dev, peer, and otherwise) as completion candidates. E.g., htz htz-theme remove lo-> will suggest lodash as completion candidates.

Non Default Directory

As mentioned above, by default, actions are executed in the configured project directory, however, it may sometimes be expedient to have two distinct project directories on the same system, for instance when using git's work-tree feature.

For that purpose, when the first argument to htz is cwd, actions will be executed in the current working directory instead of the preconfigured project directory.

For example,

~/second-copy-of-htz-frontend$ htz cwd htz-c->

will suggest packages from that directory starting with htz-c and run the chosen actions locally inside it. All other aspects of htz remain unchanged.