0.2.0 • Published 3 years ago

@marcozac/node-rig v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@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 fileDescription
api-extractor-task.jsonNo configuration
api-extractor.jsonA simple configuration targeting <projectFolder>/lib/index.d.ts. All settings disabled
heft.jsonIncludes the @rushstack/heft-jest-plugin and the deleteGlobs action to delete standard output directories: dist, lib, lib-*, temp
rush-project.jsonLists standard build output directories to cache: dist, lib, lib-cjs, temp
tsconfig.base.jsonA simple commonjs configuration for node projects targeting es2018
typescript.jsonNo 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"
}