# @marcozac/node-rig

> The base of rig packages for Node.js projects

Latest version **0.2.0** (published 2022-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @marcozac/node-rig
pnpm add @marcozac/node-rig
yarn add @marcozac/node-rig
bun add @marcozac/node-rig
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2022-04-15 |
| First published | 2022-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | marcozac |
| Maintainers | marcozac |

## Links

- npm: https://www.npmjs.com/package/@marcozac/node-rig
- Repository: https://github.com/marcozac/marcozac
- Homepage: https://github.com/marcozac/marcozac#readme
- Issues: https://github.com/marcozac/marcozac/issues
- npm.io page: https://npm.io/package/@marcozac/node-rig

## Dependencies (3)

- [enhanced-resolve](https://npm.io/package/enhanced-resolve.md) ~5.9.2
- [@microsoft/api-extractor](https://npm.io/package/@microsoft/api-extractor.md) ~7.19.5
- [@rushstack/heft-jest-plugin](https://npm.io/package/@rushstack/heft-jest-plugin.md) ~0.2.3

## Recent versions

- 0.2.0 (latest) — 2022-04-15
- 0.1.0 — 2022-03-23

## README

# @marcozac/node-rig

A [rig package](https://rushstack.io/pages/heft/rig_packages/) with a custom [Jest resolver](#jest-resolver).

```bash
npm install @marcozac/node-rig --save-dev
```

## Jest resolver

Since Jest resolver may fail to handle Node [subpath exports](https://nodejs.org/dist/latest-v16.x/docs/api/packages.html#exports), this package includes a [simple resolver](shared/jest-resolver.cjs) to handle them.

It is included in the shared [jest.config.json](base/jest.config.json) and exported under `shared/jest-resolver.cjs` path.

## Profiles

All the configuration bases are available in `base` directory and the profile ones extend them.

| Configuration base file                                 | Description                                                                                                                                                                                                                     |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [api-extractor-task.json](base/api-extractor-task.json) | No configuration                                                                                                                                                                                                                |
| [api-extractor.json](base/api-extractor.json)           | A simple configuration targeting `<projectFolder>/lib/index.d.ts`. All settings disabled                                                                                                                                        |
| [heft.json](base/heft.json)                             | Includes the [@rushstack/heft-jest-plugin](https://github.com/microsoft/rushstack/tree/master/heft-plugins/heft-jest-plugin) and the `deleteGlobs` action to delete standard output directories: `dist`, `lib`, `lib-*`, `temp` |
| [rush-project.json](base/rush-project.json)             | Lists standard build output directories to cache: `dist`, `lib`, `lib-cjs`, `temp`                                                                                                                                              |
| [tsconfig.base.json](base/tsconfig.base.json)           | A simple `commonjs` configuration for node projects targeting `es2018`                                                                                                                                                          |
| [typescript.json](base/typescript.json)                 | No configuration                                                                                                                                                                                                                |

### Default

Ships the configurations listed in the table above enabling the `api-extractor` actions except `dtsRollup`.

```json
// <projectFolder>/config/rig.json
{
  "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
  "rigPackageName": "@marcozac/node-rig"
}
```

### Tests

The [tests](profiles/tests) profile provides a shortcut to the same configuration of the [default](#default) one omitting `api-extractor` configuration (unused in test projects).

```json
// <projectFolder>/config/rig.json
{
  "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
  "rigPackageName": "@marcozac/node-rig"
}
```

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