npm.io
0.2.0 • Published 4 years ago

@marcozac/node-rig

Licence
MIT
Version
0.2.0
Deps
3
Size
14 kB
Vulns
0
Weekly
0

@marcozac/node-rig

A rig package with a custom Jest resolver.

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

Jest resolver

Since Jest resolver may fail to handle Node subpath exports, this package includes a simple resolver to handle them.

It is included in the shared 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 No configuration
api-extractor.json A simple configuration targeting <projectFolder>/lib/index.d.ts. All settings disabled
heft.json Includes the @rushstack/heft-jest-plugin and the deleteGlobs action to delete standard output directories: dist, lib, lib-*, temp
rush-project.json Lists standard build output directories to cache: dist, lib, lib-cjs, temp
tsconfig.base.json A simple commonjs configuration for node projects targeting es2018
typescript.json No configuration
Default

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

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

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

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