{"_id":"@elmijo/monorepo-helper","_rev":"1-c538b0e4feb8f5727df939fcdee13e8b","name":"@elmijo/monorepo-helper","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@elmijo/monorepo-helper","version":"1.0.0","description":"This package lets you create a Monorepo Typescript Jest configuration easily","main":"lib/index.js","types":"lib/types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/ElMijo/monorepo-helper.git"},"author":{"name":"Jerry Anselmi","email":"jerry.anselmi@gmail.com"},"license":"MIT","keywords":["monorepo","jest","helper"],"homepage":"https://elmijo.github.io/monorepo-helper/","bugs":{"url":"https://github.com/ElMijo/monorepo-helper/issues"},"engines":{"node":">=14.17.0"},"scripts":{"build":"rimraf ./lib && tsc","test":"jest --testPathPattern __tests__/unit","test:integration":"jest --testPathPattern __tests__/integration","lint":"eslint . && prettier --check .","lint:fix":"eslint --fix . && prettier --write .","docs":"rimraf ./.docs && typedoc","_postinstall":"husky install","prepublishOnly":"pinst --disable","postpublish":"pinst --enable"},"devDependencies":{"@types/jest":"^27.0.2","@types/node":"*","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","codecov":"^3.8.3","coveralls":"^3.1.1","eslint":"^7.32.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-tsdoc":"^0.2.14","husky":"^7.0.4","jest":"^27.2.2","jsdoc-plugin-typescript":"^2.0.6","lint-staged":"^12.1.4","pinst":"^2.1.6","prettier":"^2.4.1","rimraf":"^3.0.2","ts-jest":"^27.0.5","ts-node":"^10.2.1","typedoc":"^0.22.10","typescript":"^4.4.3","typescript-eslint":"^0.0.1-alpha.0","uuid":"^8.3.2"},"publishConfig":{"access":"public"},"lint-staged":{"*.{ts,json,yml}":["eslint .","prettier --check ."]},"gitHead":"cc739b88da67d7c4ac059b99ed752c857fef349b","_id":"@elmijo/monorepo-helper@1.0.0","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-+40hEad4HWjR8sWSj+csf/TEgTVMKsSmMlbzobqYYTfmra6Il5CpIrrG0RG7JWsh8BnK+e9x/LaZPkDIEaOEtw==","shasum":"797790e1d3683e81bad3a30507d57876db643335","tarball":"https://registry.npmjs.org/@elmijo/monorepo-helper/-/monorepo-helper-1.0.0.tgz","fileCount":16,"unpackedSize":22563,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzvEnCRA9TVsSAnZWagAACNwP+gKFORYB07gBhstu6NFQ\nsu0e3L5+ac9tD5p77XEKHzv6j8ARASRDJ0EvVotxcUyMyziSLbb4WRgENOdc\nc+2jhgxKx/0SqQ1Bs6Zu7MzlomixZKCL6PeegkKsQl+IwDxvUnjqSulexjjK\nv6VWEs3fdcFDd/GlAdRtkEy4WXaDLTwUFuoGcMYK1pBCYx7ixJ0tbMicSVde\nBl1Mdxd6DtGV9pLqGuENhfgHSB+lULX6MKtdXCliO8QRy4Wem/+fswr2runj\n7phnL5/7MWApTnEp6q2bGCQidIE3jRpoNIYQBXqgwDP8dULzU4lP9aB/76in\nFVuE129UphZXXj9HV59wXXzPRSNNhEpg4Sw73YAEBXNMDwY2SUDjX855b41l\nX+vu+p+JaHqP8aORPcONpcH4zm+94aksHC/CoktXETKGqXGeQ336VnIk1ZP9\nb6wAKy2BiKgmvhgymGe+ePoEWtu2+QLcgLBsDZxKJD5iEyivyPfe38crUI2V\nVZFNAU0QKpEoPC/xHUix5OHkVcluYw7jks3Z9fYq1V2yMDcQ5vjtpLuaew4j\neXks+/+3Tj6VfOoG/GzoZTo37A4VB4Lx7mQSL74tkmRJ+VXbGnIS9ovkIF2M\n7wgnL/BPonh6RoPLvyA1M7aFl076lYv+Q7b02vKS9YyP4c8u0BU5/vmsY0Fp\njWhF\r\n=5t7G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE1Mv5BVKr76bTjkYyVbCOF5GA30Xya18QGh0WH2YvzgAiAMKaXL8GZ572dS5EjCoTltXz4epiBYfNUxkQan5siuJg=="}]},"_npmUser":{"name":"elmijo","email":"jerry.anselmi@gmail.com"},"directories":{},"maintainers":[{"name":"elmijo","email":"jerry.anselmi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/monorepo-helper_1.0.0_1640952103623_0.4189324636813949"},"_hasShrinkwrap":false}},"time":{"created":"2021-12-31T12:01:43.551Z","1.0.0":"2021-12-31T12:01:43.758Z","modified":"2022-04-05T07:22:06.070Z"},"maintainers":[{"name":"elmijo","email":"jerry.anselmi@gmail.com"}],"description":"This package lets you create a Monorepo Typescript Jest configuration easily","homepage":"https://elmijo.github.io/monorepo-helper/","keywords":["monorepo","jest","helper"],"repository":{"type":"git","url":"git+https://github.com/ElMijo/monorepo-helper.git"},"author":{"name":"Jerry Anselmi","email":"jerry.anselmi@gmail.com"},"bugs":{"url":"https://github.com/ElMijo/monorepo-helper/issues"},"license":"MIT","readme":"# Monorepo Helpers\n\n[![Build Status](https://app.travis-ci.com/ElMijo/monorepo-helper.svg?branch=main)](https://app.travis-ci.com/ElMijo/monorepo-helper) [![codecov](https://codecov.io/gh/ElMijo/monorepo-helper/branch/main/graph/badge.svg?token=8DfGB9WxYx)](https://codecov.io/gh/ElMijo/monorepo-helper) [![Coverage Status](https://coveralls.io/repos/github/ElMijo/monorepo-helper/badge.svg?branch=main)](https://coveralls.io/github/ElMijo/monorepo-helper?branch=main)\n\nThis package has some helpers to work more easily with a Monorepository.\n\n## Install\n\n**yarn**\n\n```bash\nyarn add --dev @elmijo/monorepo-helpers\n```\n\n**npm**\n\n```bash\nnpm i --save-dev @elmijo/monorepo-helpers\n```\n\n## Usage\n\n### Single package repository\n\n**Project skeleton**\n\n```\nproject\n| package.json\n| index.ts\n| README.md\n|\n└─packages\n  |\n  └─packageA\n  |   package.json\n  |   index.ts\n  |   README.md\n  |\n  └─packageB\n      package.json\n      index.ts\n      README.md\n```\n\n**Package A**\n\n```ts\n// packages/packageA/jest.config.ts\nimport { jestPackageConfig } from \"@elmijo/monorepo-helper\"\n\nexport default jestPackageConfig({ projectDir: __dirname })\n```\n\n**Package B**\n\n```ts\n// packages/packageB/jest.config.ts\nimport { jestPackageConfig } from \"@elmijo/monorepo-helper\"\n\nexport default jestPackageConfig({ projectDir: __dirname })\n```\n\n**Project**\n\n```ts\n// jest.config.ts\nimport { jestRootConfig } from \"@elmijo/monorepo-helper\"\n\nexport default jestRootConfig({ packageRepos: [\"./packages\"] })\n```\n\n### Multi package repositories\n\n**Project skeleton**\n\n```\nproject\n| package.json\n| index.ts\n| README.md\n|\n└─frontend\n| |\n| └─packageA\n|     package.json\n|     index.ts\n|     README.md\n|\n└─backend\n  |\n  └─packageB\n      package.json\n      index.ts\n      README.md\n```\n\n**Package A**\n\n```ts\n// packages/frontend/packageA/jest.config.ts\nimport { jestPackageConfig } from \"@elmijo/monorepo-helper\"\n\nexport default jestPackageConfig({ projectDir: __dirname })\n```\n\n**Package B**\n\n```ts\n// packages/backend/packageB/jest.config.ts\nimport { jestPackageConfig } from \"@elmijo/monorepo-helper\"\n\nexport default jestPackageConfig({ projectDir: __dirname })\n```\n\n**Project**\n\n```ts\n// jest.config.ts\nimport { jestRootConfig } from \"@elmijo/monorepo-helper\"\n\nexport default jestRootConfig({ packageRepos: [\"./frontend\", \"./backend\"] })\n```\n\n### Custom configuration\n\nBoth functions work with a default configuration, but you can override them whenever you want. Let's use the single package repository example, you can do that:\n\n```ts\n// packages/packageA/jest.config.ts\nimport { Config } from \"@jest/types\"\nimport { jestPackageConfig } from \"@elmijo/monorepo-helper\"\n\nexport default {\n  ...jestPackageConfig({ projectDir: __dirname }),\n  verbose: true,\n} as Config.InitialOptions\n```\n\n**Package B**\n\n```ts\n// packages/packageB/jest.config.ts\nimport { Config } from \"@jest/types\"\nimport { jestPackageConfig } from \"@elmijo/monorepo-helper\"\n\nexport default {\n  ...jestPackageConfig({ projectDir: __dirname }),\n  coverageThreshold: {\n    global: {\n      branches: 95,\n      functions: 95,\n      lines: 95,\n      statements: 95,\n    },\n  },\n} as Config.InitialOptions\n```\n\n**Project**\n\n```ts\n// jest.config.ts\nimport { Config } from \"@jest/types\"\nimport { jestRootConfig } from \"@elmijo/monorepo-helper\"\n\nexport default {\n  ...jestRootConfig({ packageRepos: [\"./packages\"] })\n  watchman: false\n} as Config.InitialOptions\n```\n\n## Documentation\n\n(https://elmijo.github.io/monorepo-helper/)[https://elmijo.github.io/monorepo-helper/]\n","readmeFilename":"README.md"}