# hygen-import

> `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.

Latest version **1.0.4** (published 2018-02-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install hygen-import
pnpm add hygen-import
yarn add hygen-import
bun add hygen-import
```

Provides the command `hygen-add`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2018-02-22 |
| First published | 2018-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 29.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | jondot |

## Links

- npm: https://www.npmjs.com/package/hygen-import
- npm.io page: https://npm.io/package/hygen-import

## Dependencies (8)

- [ora](https://npm.io/package/ora.md) ^1.4.0
- [yarn](https://npm.io/package/yarn.md) ^1.3.2
- [chalk](https://npm.io/package/chalk.md) ^2.3.0
- [execa](https://npm.io/package/execa.md) ^0.9.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.5
- [fs-extra](https://npm.io/package/fs-extra.md) ^5.0.0
- [inquirer](https://npm.io/package/inquirer.md) ^5.1.0
- [yargs-parser](https://npm.io/package/yargs-parser.md) ^9.0.2

## Recent versions

- 1.0.4 (latest) — 2018-02-22

## README

# hygen-add

`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.

## 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](https://github.com/jondot/hygen-add/graphs/contributors) - you make this happen, thanks!

# Copyright

Copyright (c) 2018 [Dotan Nahum](http://gplus.to/dotan) [@jondot](http://twitter.com/jondot). See [LICENSE](LICENSE.txt) for further details.

---
_Source: https://npm.io/package/hygen-import · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
