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

hygen-add

v1.0.5

Published

`hygen-add` is one of the tools in the [Hygen](http://www.hygen.io) toolbelt which allows you to add pre-made generator packages to your project.

Downloads

64

Readme

hygen-add

hygen-add is one of the tools in the Hygen toolbelt which allows you to add pre-made generator packages to your project.

Quick Start

Install:

$ yarn add --dev hygen-add

And add a package:

$ hygen-add test-package

What's Defines a Package?

A package can be a Git repository, path (location), or a node module. In all cases, a package needs:

  • To have a package.json file that is installable by Yarn.
  • To have a _templates folder where your generators will be.

Naming Your Package

Since there are two options to use (Git and npm), using Git you can end up with a repository that's named one thing, and the package in it is named another thing.

Here's how to treat all cases.

As a Node Module

If you decide to push your package as a proper node module, then you must prefix its name as hygen-YOURNAME, and installing it will be:

$ hygen-add YOURNAME

We use the hygen- prefix to avoid trashing the node module ecosystem, and to allow for easy search. Meaning, you can search for hygen- to get a listing of all packages on a node module registry.

As a Git Repo

If you decide to publish as a Git repo, you can use hygen-add like this:

$ hygen-add https://github.com/jondot/foo-bar

A name of a package, even if it's on a Git repo and was never pushed to npm, is still the same name that is specified in your package.json file.

With that in mind any repo works and there's no special naming rules for the repo itself. In this case the default name for the package will be foo-bar and taken directly from the Git repo address.

If you have a different name within the actual package in the repo, you can override the default and specify a name:

$ hygen-add https://github.com/jondot/not-a-name --name best-generator

Contributing

Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).

Thanks:

To all Contributors - you make this happen, thanks!

Copyright

Copyright (c) 2018 Dotan Nahum @jondot. See LICENSE for further details.