{"_id":"@diamir/nx-executors","_rev":"7-0058319918d11abf783c9003c802a031","name":"@diamir/nx-executors","dist-tags":{"latest":"23.0.0-beta.3"},"versions":{"22.0.0":{"name":"@diamir/nx-executors","version":"22.0.0","keywords":[],"author":{"name":"Backend","email":"backend@diamir.io"},"license":"ISC","_id":"@diamir/nx-executors@22.0.0","maintainers":[{"name":"ws-admin","email":"backend@webundsoehne.com"},{"name":"dabls","email":"stephan.schmid@diamir.io"}],"homepage":"https://github.com/tailoredmedia/backend-nx-skeleton#readme","bugs":{"url":"https://github.com/tailoredmedia/backend-nx-skeleton/issues"},"dist":{"shasum":"3855836775c626d875e1a25e7d55a24322871243","tarball":"https://registry.npmjs.org/@diamir/nx-executors/-/nx-executors-22.0.0.tgz","fileCount":40,"integrity":"sha512-KKRYa6HmDCI1tw59W/DGSKgbENdtP06n4er/VOP0K7sGRoeiELyLBlD9tZ3NRLkylMECLdkO14/ccnpfVcxykg==","signatures":[{"sig":"MEYCIQDMw8aYghesxsUS6qFtmt791QohtgRDLFGN3Zxnzq/h/AIhAPhpt/X4X8WTUZTYdpK+cX+4vwFvf0M8HPEeWd+VWPp2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63988},"main":"./src/index.js","type":"commonjs","_from":"file:diamir-nx-executors-22.0.0.tgz","types":"./src/index.d.ts","engines":{"node":">= 20"},"_npmUser":{"name":"ws-admin","email":"backend@webundsoehne.com"},"_resolved":"/tmp/43e3670888433579ed125ce509178c0b/diamir-nx-executors-22.0.0.tgz","executors":"./executors.json","_integrity":"sha512-KKRYa6HmDCI1tw59W/DGSKgbENdtP06n4er/VOP0K7sGRoeiELyLBlD9tZ3NRLkylMECLdkO14/ccnpfVcxykg==","repository":{"url":"git+https://github.com/tailoredmedia/backend-nx-skeleton.git","type":"git"},"_npmVersion":"10.9.2","description":"<p align=\"center\">   <a href=\"https://webundsoehne.com\" target=\"blank\">     <img src=\"https://webundsoehne.com/wp-content/uploads/webundsoehne-logo.png\" width=\"320\" alt=\"Web und Söhne - Logo\" />   </a> </p> Web & Söhne is Austria's leading expert in progr","directories":{},"_nodeVersion":"22.13.1","dependencies":{"tslib":"2.8.1","@nx/js":"22.3.3","@nx/jest":"22.3.3","@nx/devkit":"22.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"nx":">= 22.0.0","ts-node":">= 10.0.0","typescript":">= 3.9.0","ts-node-dev":">= 2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nx-executors_22.0.0_1778592981531_0.6204339573861342","host":"s3://npm-registry-packages-npm-production"}},"22.0.1":{"name":"@diamir/nx-executors","version":"22.0.1","keywords":["diamir","nx","executor","typescript","jest","ts-node-dev"],"author":{"name":"Backend","email":"backend@diamir.io"},"license":"ISC","_id":"@diamir/nx-executors@22.0.1","maintainers":[{"name":"ws-admin","email":"backend@webundsoehne.com"},{"name":"dabls","email":"stephan.schmid@diamir.io"}],"homepage":"https://github.com/tailoredmedia/backend-nx-skeleton#readme","bugs":{"url":"https://github.com/tailoredmedia/backend-nx-skeleton/issues"},"dist":{"shasum":"8ced51986ec9f60a5a2572f1cb476736875aacde","tarball":"https://registry.npmjs.org/@diamir/nx-executors/-/nx-executors-22.0.1.tgz","fileCount":40,"integrity":"sha512-2J2vNYUCPEgo4o1rhPVRn5uvsF3dSN7nmJ0AgtEZFNw89qT6b1LzUn23xUPWxzFxnWGWdltKWawDLSzh6Ow5FQ==","signatures":[{"sig":"MEUCIQDFvh5Iw8//xrZRAzIkk8n5HBDtw0/DkfyxKMxoYIxQsgIgKZzNhZY1bf4MwYh0zutntXYr/kE0ejo++1Jl1IHllqo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63904},"main":"./src/index.js","type":"commonjs","_from":"file:diamir-nx-executors-22.0.1.tgz","types":"./src/index.d.ts","engines":{"node":">= 20"},"_npmUser":{"name":"ws-admin","email":"backend@webundsoehne.com"},"_resolved":"/tmp/c02f01d556b9af07e67b3d6b9a65111b/diamir-nx-executors-22.0.1.tgz","executors":"./executors.json","_integrity":"sha512-2J2vNYUCPEgo4o1rhPVRn5uvsF3dSN7nmJ0AgtEZFNw89qT6b1LzUn23xUPWxzFxnWGWdltKWawDLSzh6Ow5FQ==","repository":{"url":"git+https://github.com/tailoredmedia/backend-nx-skeleton.git","type":"git"},"_npmVersion":"10.9.8","description":"Nx custom executors","directories":{},"_nodeVersion":"22.22.3","dependencies":{"tslib":"2.8.1","@nx/js":"22.3.3","@nx/jest":"22.3.3","@nx/devkit":"22.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"nx":">= 22.0.0","ts-node":">= 10.0.0","typescript":">= 3.9.0","ts-node-dev":">= 2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nx-executors_22.0.1_1778851698655_0.11241824001239009","host":"s3://npm-registry-packages-npm-production"}},"22.0.2":{"name":"@diamir/nx-executors","version":"22.0.2","keywords":["diamir","nx","executor","typescript","jest","ts-node-dev"],"author":{"name":"Backend","email":"backend@diamir.io"},"license":"ISC","_id":"@diamir/nx-executors@22.0.2","maintainers":[{"name":"ws-admin","email":"backend@webundsoehne.com"},{"name":"dabls","email":"stephan.schmid@diamir.io"}],"homepage":"https://github.com/tailoredmedia/backend-nx-skeleton#readme","bugs":{"url":"https://github.com/tailoredmedia/backend-nx-skeleton/issues"},"dist":{"shasum":"a98f94ad9b5bfbafc88e754117c080d29f728d18","tarball":"https://registry.npmjs.org/@diamir/nx-executors/-/nx-executors-22.0.2.tgz","fileCount":40,"integrity":"sha512-8ExvnQDcXrwz5XkbskS+Bw8wUV9QVHeN35PZY3kZfyI/wKIyJq6vSPa4+IKQWWFIBzQi+3FrRmT5Fc7MelsdrA==","signatures":[{"sig":"MEUCICku1u21Uf8NQT7UiWg3t+wGdrw8WTDkGRCTRFmXfgqwAiEAhF5TkzDRwrKQJPcd2jk0orkm4NBNfiT5ujE8zzF0zXg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63908},"main":"./src/index.js","type":"commonjs","_from":"file:diamir-nx-executors-22.0.2.tgz","types":"./src/index.d.ts","engines":{"node":">= 20"},"_npmUser":{"name":"ws-admin","email":"backend@webundsoehne.com"},"_resolved":"/tmp/c6056b92ae500f97ff2bb7e75b78c129/diamir-nx-executors-22.0.2.tgz","executors":"./executors.json","_integrity":"sha512-8ExvnQDcXrwz5XkbskS+Bw8wUV9QVHeN35PZY3kZfyI/wKIyJq6vSPa4+IKQWWFIBzQi+3FrRmT5Fc7MelsdrA==","repository":{"url":"git+https://github.com/tailoredmedia/backend-nx-skeleton.git","type":"git"},"_npmVersion":"10.9.8","description":"Nx custom executors","directories":{},"_nodeVersion":"22.22.3","dependencies":{"tslib":"^2.8.1","@nx/js":"^22.7.0","@nx/jest":"^22.7.0","@nx/devkit":"^22.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"nx":">= 22.0.0","ts-node":">= 10.0.0","typescript":">= 3.9.0","ts-node-dev":">= 2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nx-executors_22.0.2_1779200936592_0.8733353150834366","host":"s3://npm-registry-packages-npm-production"}},"22.0.3":{"name":"@diamir/nx-executors","version":"22.0.3","keywords":["diamir","nx","executor","typescript","jest","ts-node-dev"],"author":{"name":"Backend","email":"backend@diamir.io"},"license":"ISC","_id":"@diamir/nx-executors@22.0.3","maintainers":[{"name":"ws-admin","email":"backend@webundsoehne.com"},{"name":"dabls","email":"stephan.schmid@diamir.io"}],"homepage":"https://github.com/tailoredmedia/backend-nx-skeleton#readme","bugs":{"url":"https://github.com/tailoredmedia/backend-nx-skeleton/issues"},"dist":{"shasum":"eba5ebbfdfb25d3b0837d6661e80ea6a83ca3eab","tarball":"https://registry.npmjs.org/@diamir/nx-executors/-/nx-executors-22.0.3.tgz","fileCount":40,"integrity":"sha512-9gUoV6fDoeg9dBl+t+OxaY0JeiKzDM0r7+esDncQUpkA5cvDdCO8DiJeI95qPpukZXi7EGx6BJhPmbIVG8D6Bg==","signatures":[{"sig":"MEYCIQCXBkZ3hZtsEo3gPHkhPUIM5oTC2IXtjgsuPdNMQkmdEgIhANhueMf7eeHRqp38j95bwlALeDmy6pESmwACwfETQKJi","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63908},"main":"./src/index.js","type":"commonjs","_from":"file:diamir-nx-executors-22.0.3.tgz","types":"./src/index.d.ts","engines":{"node":">= 20"},"_npmUser":{"name":"ws-admin","email":"backend@webundsoehne.com"},"_resolved":"/tmp/fc3996487e98d936dea9eeaed444d84c/diamir-nx-executors-22.0.3.tgz","executors":"./executors.json","_integrity":"sha512-9gUoV6fDoeg9dBl+t+OxaY0JeiKzDM0r7+esDncQUpkA5cvDdCO8DiJeI95qPpukZXi7EGx6BJhPmbIVG8D6Bg==","repository":{"url":"git+https://github.com/tailoredmedia/backend-nx-skeleton.git","type":"git"},"_npmVersion":"10.9.8","description":"Nx custom executors","directories":{},"_nodeVersion":"22.22.3","dependencies":{"tslib":"^2.8.1","@nx/js":"^22.7.0","@nx/jest":"^22.7.0","@nx/devkit":"^22.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"nx":">= 22.0.0","ts-node":">= 10.0.0","typescript":">= 3.9.0","ts-node-dev":">= 2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nx-executors_22.0.3_1779798932037_0.7621258879645687","host":"s3://npm-registry-packages-npm-production"}},"23.0.0-beta.1":{"name":"@diamir/nx-executors","version":"23.0.0-beta.1","keywords":["diamir","nx","executor","typescript","jest","ts-node-dev"],"author":"Backend <backend@diamir.io>","license":"ISC","_id":"@diamir/nx-executors@23.0.0-beta.1","maintainers":[{"name":"ws-admin","email":"backend@webundsoehne.com"},{"name":"dabls","email":"stephan.schmid@diamir.io"}],"dist":{"shasum":"d16a716975884c6da592c56482b372a190d033c5","tarball":"https://registry.npmjs.org/@diamir/nx-executors/-/nx-executors-23.0.0-beta.1.tgz","fileCount":40,"integrity":"sha512-BeMbt4Efb5uI17n4a3wo0daeZYWKEuU4xgttKNEg5Czo+YQEk3G4X/NMSVco+cCXOZFZxY1c1hLCotV2F41KrQ==","signatures":[{"sig":"MEUCIQCo2u7KFa+imhSPlKNZ2V+XCKgpW80382Kgx8tdaBTrJwIgad2Y9gvtcm36Z/jDw40wUjdwZol3/NvhyvthHUqfm38=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64343},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","engines":{"node":">= 20"},"_npmUser":{"name":"ws-admin","email":"backend@webundsoehne.com"},"executors":"./executors.json","repository":"https://github.com/tailoredmedia/backend-nx-skeleton","description":"Nx custom executors","directories":{},"_nodeVersion":"26.0.0","dependencies":{"tslib":"^2.8.1","@nx/js":"^23.1.0","@nx/jest":"^23.1.0","@nx/devkit":"^23.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"nx":">= 23.1.0","ts-node":">= 10.0.0","typescript":">= 3.9.0","ts-node-dev":">= 2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nx-executors_23.0.0-beta.1_1785393216855_0.02173266085462111","host":"s3://npm-registry-packages-npm-production"}},"23.0.0-beta.2":{"name":"@diamir/nx-executors","version":"23.0.0-beta.2","keywords":["diamir","nx","executor","typescript","jest","ts-node-dev"],"author":"Backend <backend@diamir.io>","license":"ISC","_id":"@diamir/nx-executors@23.0.0-beta.2","maintainers":[{"name":"ws-admin","email":"backend@webundsoehne.com"},{"name":"dabls","email":"stephan.schmid@diamir.io"}],"dist":{"shasum":"83bd4bf865e018422fa423eefdab8cd3b48169c5","tarball":"https://registry.npmjs.org/@diamir/nx-executors/-/nx-executors-23.0.0-beta.2.tgz","fileCount":40,"integrity":"sha512-4NqcABIbt0H7bDRn/vLaMi+xBwSeXeiF5/WXaSUCEPO0RWg3vQ9bupllKTN2qjoX/nj4QzCqSmLCmungXmEDNQ==","signatures":[{"sig":"MEYCIQDG+mTCBT8SMqlbthxWLPhhJgqdX0gZUlsZeCgYlo2OwgIhAPuugl4FbD2QgA57XsthRTu7PwUqfGys6XhdITIG0RHJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64272},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","engines":{"node":">= 20"},"_npmUser":{"name":"ws-admin","email":"backend@webundsoehne.com"},"executors":"./executors.json","repository":"https://github.com/tailoredmedia/backend-nx-skeleton","description":"Nx custom executors","directories":{},"_nodeVersion":"26.0.0","dependencies":{"tslib":"^2.8.1","@nx/js":"^23.1.0","@nx/jest":"^23.1.0","@nx/devkit":"^23.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"nx":">= 23.1.0","ts-node":">= 10.0.0","typescript":">= 3.9.0","ts-node-dev":">= 2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nx-executors_23.0.0-beta.2_1785743860759_0.5258463744839723","host":"s3://npm-registry-packages-npm-production"}},"23.0.0-beta.3":{"_id":"@diamir/nx-executors@23.0.0-beta.3","dist":{"shasum":"4c059acb8c9864eba820c0f4cb04cb4f05554dda","tarball":"https://registry.npmjs.org/@diamir/nx-executors/-/nx-executors-23.0.0-beta.3.tgz","fileCount":40,"integrity":"sha512-WB8Qyy3rnAdq7B3GRfegRxrWJTPYlLtw1xi3sB4KITzGoCrPecJ4QdylY93qEP68ZkaHIkex29bhCKoEw2G0QA==","signatures":[{"sig":"MEYCIQCrBYdD4GcZs0e3WpyseSAd2nFz3+G+aQ5pMwOiwYng3wIhAOxDhLltiMcXH3D2GCCCYcrIopjxXy0fqiCF4km3yRcy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHVvyWVQ66+Pwc1MOBUlNUi3efl3hjtmLeu/V3r6BuGSAiEAsPLxKVEukreGxGQ3gqKV0PGLmWU5V7fhdWtce9VHjWc="}],"unpackedSize":63955},"main":"./src/index.js","name":"@diamir/nx-executors","type":"commonjs","types":"./src/index.d.ts","author":"Backend <backend@diamir.io>","engines":{"node":">= 20"},"license":"ISC","version":"23.0.0-beta.3","_npmUser":{"name":"ws-admin","email":"backend@webundsoehne.com"},"keywords":["diamir","nx","executor","typescript","jest","ts-node-dev"],"executors":"./executors.json","repository":{"url":"https://github.com/tailoredmedia/backend-nx-skeleton","type":"git"},"description":"Nx custom executors","directories":{},"maintainers":[{"name":"ws-admin","email":"backend@webundsoehne.com"},{"name":"dabls","email":"stephan.schmid@diamir.io"}],"dependencies":{"tslib":"^2.8.1","@nx/js":"^23.2.0","@nx/jest":"^23.2.0","@nx/devkit":"^23.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"nx":">= 23.1.0","ts-node":">= 10.0.0","typescript":">= 3.9.0","ts-node-dev":">= 2.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nx-executors_23.0.0-beta.3_1790260959570_0.3734311385671083"}}},"time":{"created":"2026-05-12T13:36:21.359Z","modified":"2026-09-24T14:42:39.844Z","22.0.0":"2026-05-12T13:36:21.675Z","22.0.1":"2026-05-15T13:28:18.831Z","22.0.2":"2026-05-19T14:28:56.715Z","22.0.3":"2026-05-26T12:35:32.176Z","23.0.0-beta.1":"2026-07-30T06:33:36.999Z","23.0.0-beta.2":"2026-08-03T07:57:40.893Z","23.0.0-beta.3":"2026-09-24T14:42:39.665Z"},"author":"Backend <backend@diamir.io>","license":"ISC","keywords":["diamir","nx","executor","typescript","jest","ts-node-dev"],"repository":{"url":"https://github.com/tailoredmedia/backend-nx-skeleton","type":"git"},"description":"Nx custom executors","maintainers":[{"name":"ws-admin","email":"backend@webundsoehne.com"},{"name":"dabls","email":"stephan.schmid@diamir.io"}],"readme":"# nx-executors\n\n\n## Description\n\nThis package includes [nx](https://github.com/nrwl/nx) libraries for customising the build and serve process.\n\n---\n\n<!-- TOC -->\n* [nx-executors](#nx-executors)\n  * [Description](#description)\n  * [Executors](#executors)\n    * [tsc](#tsc)\n      * [Configuration](#configuration)\n    * [ts-node-dev](#ts-node-dev)\n      * [Configuration](#configuration-1)\n    * [run](#run)\n      * [Configuration](#configuration-2)\n    * [jest](#jest)\n      * [Configuration](#configuration-3)\n  * [Plugins](#plugins)\n    * [Single Plugin](#single-plugin)\n    * [Split Plugins](#split-plugins)\n    * [Exclude Plugins](#exclude-plugins)\n* [Migration](#migration)\n  * [Packages](#packages)\n  * [gitignore](#gitignore)\n  * [tsconfig paths](#tsconfig-paths)\n  * [nx.json](#nxjson)\n  * [Lint + Test](#lint--test)\n    * [EsLint](#eslint)\n    * [Jest](#jest-1)\n  * [Projects](#projects)\n* [Links](#links)\n<!-- TOC -->\n\n---\n\n## Executors\n\n### tsc\n\nExecutor: `@diamir/nx-executors:tsc`\n\nExtends the default `@nx/js:tsc` executor to set the `cwd` to the project-root and prefixes the `main` and `tsConfig` to\nshorten the configuration. On the other hand, the `targetDefaults` assets will be merged with the project assets,\nallowing to extend assets in the `project.json` instead of overwriting them. Furthermore by default the `package.json`\nand `package-lock.json` will be generated.\n\n#### Configuration\n\nExtends the default tsc executor options: https://nx.dev/nx-api/js/executors/tsc#options\n\n```json5\n{\n  targets: {\n    build: {\n      executor: '@diamir/nx-executors:tsc',\n      options: {\n        main: 'src/main.ts',\n        tsConfig: 'tsconfig.app.json',\n        // additional optional options\n        mergeAssets: true,\n        // set `false` to overwrite targetDefault assets\n        cwd: '{projectRoot}'\n        // used to prefix `main` and `tsConfig` paths\n      }\n    }\n  }\n}\n```\n\n### ts-node-dev\n\nExecutor: `@diamir/nx-executors:ts-node-dev`\n\nRun a project in the source folder directly, where all the assets will be in place. It will pipe the output through a\ncustom logger where it will prefix the name of the project to make it easily identifiable while running multiple\npackages in parallel.<br> There is no tsconfig-path replacer set up by default. Either use `tsconfig-paths` and register\nit via the `args` option, or use `typescript-transform-paths` with`ts-patch` and add it als `transformer` plugin to the\ntsconfig file.\n\n#### Configuration\n\n```json5\n{\n  targets: {\n    serve: {\n      executor: '@diamir/nx-executors:ts-node-dev',\n      options: {\n        // required\n        main: 'src/main.ts',\n        tsConfig: 'tsconfig.app.json',\n        // optional\n        cwd: '{projectRoot}',\n        // defaults to the project-root\n        env: {\n          // or alias \"environment\"\n          NODE_ENV: 'develop'\n        },\n        debug: true,\n        // ts-node-dev `--debug` flag\n        watchConfig: false,\n        // watch the `config` directory files (to restart on config change)\n        args: [\n          '-r',\n          'tsconfig-paths/register'\n        ],\n        // pass additional arguments to ts-node-dev,\n        keepPackageVersion: false\n        // keep projects package.json version (default: false)\n      }\n    }\n  }\n}\n```\n\n### run\n\nExecutor: `@diamir/nx-executors:run`\n\nExtends the default `nx:run-commands` executor to set the `cwd` to the project-root. On running node binaries, set the\n`tsNode` option to `true` to get typescript support. (Will extend the `nodeOptions` with `-r ts-node/register` is not\nalready set)\n\n#### Configuration\n\nExtends the default run-commands executor options: https://nx.dev/nx-api/nx/executors/run-commands#options\n\n```json\n{\n  \"targets\": {\n    \"seed\": {\n      \"executor\": \"@diamir/nx-executors:run\",\n      \"options\": {\n        \"command\": \"ts-node ./seed/seed.ts\",\n        \"env\": {\n          \"NODE_ENV\": \"test\"\n        }\n      }\n    }\n  }\n}\n```\n\n```json5\n{\n  targets: {\n    seed: {\n      executor: '@diamir/nx-executors:run',\n      options: {\n        tsNode: true,\n        command: 'migrate-mongo up -f ./database/migrate-mongoose.ts'\n      }\n    }\n  }\n}\n```\n\n### jest\n\nExecutor: `@diamir/nx-executors:jest`\n\nExtends the `@nx/jest:jest` executor to move to the correct project-folder and extend it with some more configurations.\n\n#### Configuration\n\nExtends the default jest executor options: https://nx.dev/nx-api/jest/executors/jest#options\n\n```json\n{\n  \"targets\": {\n    \"seed\": {\n      \"executor\": \"@diamir/nx-executors:jest\",\n      \"options\": {\n        \"jestConfig\": \"./test/jest.config.ts\"\n      }\n    }\n  }\n}\n```\n\n## Plugins\n\nBy default, the `serve`, `build`, `typecheck`, `test` and `e2e` targets are added to each `\"projectType\": \"application\"`\nproject ( `test` & `e2e` only if a valid jest config is found).\n\nIf you need to disable the plugin for a specific project (i.e. the mono-repo includes a frontend project with own\ntargets) you can add `skipNxExecutors` to the `project.json` `tags`.\n\n### Single Plugin\n\nTo add all plugins (tsc, ts-node-dev and jest) just add the plugin to the `nx.json` config. This will add all\napplication targets with the default configurations (as seen in the split plugins below).\n\n```json5\n{\n  plugins: [\n    '@diamir/nx-executors/plugin'\n  ]\n}\n```\n\n### Split Plugins\n\nEach executor-plugin can be added on its own to the `nx.json` too. To override additional configs (beside the plugin\nconfig) set `tagetDefaults` accordingly.\n\nAdd `tsc` executor as `build` target.\n\n```json5\n{\n  plugin: '@diamir/nx-executors/plugin/tsc',\n  options: {\n    // these are the default options\n    targetName: 'build',\n    executor: '@diamir/nx-executors:tsc',\n    typecheckTargetName: 'typecheck'\n  }\n}\n```\n\nAdd `ts-node-dev` as `serve` target.\n\n```json5\n{\n  plugin: '@diamir/nx-executors/plugin/ts-node-dev',\n  options: {\n    // these are the default options\n    targetName: 'serve',\n    executor: '@diamir/nx-executors:ts-node-dev'\n  }\n}\n```\n\nAdd `jest` as `test` target. (Including `e2e` and `cov` configurations)\n\n```json5\n{\n  plugin: '@diamir/nx-executors/plugin/jest',\n  options: {\n    // these are the default options\n    targetName: 'test',\n    executor: '@diamir/nx-executors:jest',\n    testConfig: './test/jest.config.ts',\n    e2eTestConfig: './test/jest-e2e.config.ts'\n  }\n}\n```\n\nAdd `tsc`, `tsc-node-dev` and `jest`' as `build`, `server` and `test` target.\n\n```json5\n{\n  plugin: '@diamir/nx-executors/plugin',\n  options: {\n    tscOptions: {},\n    // same options as `[..]/plugin/tsc`\n    tsNodeDevOptions: {},\n    // same options as `[..]/plugin/ts-node-dev`\n    jestOptions: {}\n    // same options as `[..]/plugin/jest`\n  }\n}\n```\n\n**Hint:** on config change it needs `nx reset` to clear the cached targets before the change is active.\n\n### Exclude Plugins\n\nBesides excluding all plugins with the `skipNxExecutors` tag for a project, there is the option to just skip single\nplugins from generating targets for a project:\n\n| tag                         | description                                  |\n|-----------------------------|----------------------------------------------|\n| skipNxExecutors:tsc         | Skip generating `build` & `typecheck` target |\n| skipNxExecutors:ts-node-dev | Skip generating `serve` target               |\n| skipNxExecutors:jest        | Skip generating `test` & `e2e` target        |\n| skipNxExecutors:jest:test   | Skip generating `test` target                |\n| skipNxExecutors:jest:e2e    | Skip generating `e2e` target                 |\n\n# Migration\n\nSome tips on how to migrate from the older nx-builders to the new nx-executors.\n\n## Packages\n\nThe old `@nwrl` and `@angular-devkit` packages can be replaced by a handful of new `@nx` packages:\n\n```\n\"@nx/eslint\" ... eslint executor + plugin\n\"@nx/eslint-plugin\" ... eslint rules\n\"@nx/jest\" ... jest executor + plugin\n\"nx\" ... nx cli + basic executor\n```\n\n## gitignore\n\nWith those new packages, nx has a new cache folder structure that needs to be set in the .gitignore file:\n\n```\n# nx cache\n.nx/cache\n.nx/workspace-data\n```\n\n## tsconfig paths\n\nFor an easy way to work with tsconfig paths include `ts-patch` and `typescript-transform-paths` as dev-dependency. Add a\n`prepare` script (for local use): `ts-patch install -s` and include\n`\"plugins\": [{ \"transform\": \"typescript-transform-paths\" }]` in the `tsconfig.json`. After running `npm i` or\n`npm run prepare` the tsconfig paths should be replaced for any process that uses this `tsconfig.json` (i.e.\nts-node-dev, jest, ...)\n\n## nx.json\n\nFirst the schema for the `nx.json` changed, so it needs to be replaced with the new schema\n\n```json5\n// nx.json\n{\n  $schema: './node_modules/nx/schemas/nx-schema.json',\n  namedInputs: {\n    default: [\n      '{projectRoot}/**/*',\n      'sharedGlobals'\n    ],\n    production: [\n      'default',\n      '!{projectRoot}/.eslintrc.json',\n      '!{projectRoot}/eslint.config.js',\n      '!{projectRoot}/tsconfig.spec.json',\n      '!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)',\n      '!{projectRoot}/jest.config.[jt]s',\n      '!{projectRoot}/src/test-setup.[jt]s',\n      '!{projectRoot}/test-setup.[jt]s'\n    ],\n    sharedGlobals: []\n  },\n  targetDefaults: {},\n  plugins: []\n}\n```\n\nSecondly the `workspace.json` is deprecated and can be removed.\n\n## Lint + Test\n\nInstead of having a separate `lint` and `test` target in each `project.json` we can use the nx-plugins to add those\ntargets for us.\n\n```json5\n// nx.json\n{\n  targetDefaults: {\n    test: {\n      options: {\n        passWithNoTests: true\n      }\n    }\n  },\n  plugins: [\n    {\n      plugin: '@nx/eslint/plugin',\n      options: {\n        targetName: 'lint'\n      }\n    },\n    {\n      plugin: '@nx/jest/plugin',\n      options: {\n        targetName: 'test'\n      }\n    }\n  ]\n}\n```\n\n### EsLint\n\nReplace the plugin in the `eslintrc` to: `\"plugins\": [\"@nx\"]`. Everything else should be good to go.\n\n### Jest\n\nFor the jest plugin to work, first update or add the `jest.config.ts` file to pick the projects that should receive the\ntest target\n\n```typescript\n// jest.config.ts\nimport { getJestProjectsAsync } from '@nx/jest'\n\nexport default async () => ({\n  projects: await getJestProjectsAsync()\n})\n```\n\nThen move/create a `jest.config.ts` in the root of the project, jest should run in (i.e. move the file from the `test`\nfolder into the project root)\n\n```typescript\n// apps/../jest.config.ts\nexport default {\n  displayName: 'app', // change to project name\n  preset: '../../jest.preset.js'\n}\n```\n\n```javascript\n// jest.preset.js\nconst nxPreset = require('@nx/jest/preset').default\n\nmodule.exports = {\n  ...nxPreset,\n  testEnvironment: 'node',\n  transform: {\n    '^.+\\\\.(ts|js)$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.json' }] // only required if not using `tsconfig.spec.json`\n  }\n}\n```\n\n## Projects\n\nBecause we move most logic to the nx plugins we can clear up the unused targets like `lint` and `test` in the\n`project.json` files for the each application/library.\n\nSame can be done for `build` and `server` by adding the `@diamir/nx-executors/plugin` to the `nx.json` and set some\n`targetDefaults`:\n\n```json5\n{\n  targetDefaults: {\n    serve: {\n      options: {\n        // restart service if a config file changes\n        watchConfig: true\n      }\n    },\n    build: {\n      options: {\n        // default assets (will be merged with the project.json assets, if not configured otherwise)\n        assets: [\n          {\n            glob: '*',\n            input: '{projectRoot}/config',\n            output: 'config'\n          },\n          {\n            glob: '.dockerignore',\n            input: '{projectRoot}',\n            output: '.'\n          },\n          {\n            glob: 'Dockerfile',\n            input: '{projectRoot}',\n            output: '.'\n          }\n        ]\n      }\n    }\n  },\n  plugins: [\n    {\n      // other plugins\n    },\n    {\n      plugin: '@diamir/nx-executors/plugin'\n    }\n  ]\n}\n```\n\nWith this setup, only project specific configuration overrides or targets need to be set in the `project.json` any\ngenerally used target like `test`, `lint`, `build` and `serve` will be available via the plugins and do not have to be\nset manually in each `project.json` any more.\n\n# Links\n- [Diamir](https://diamir.io/)\n- [nx](https://nx.dev/)\n","readmeFilename":""}