Skip to content

Instantly share code, notes, and snippets.

@pkonieczniak
Last active October 3, 2022 11:27
Show Gist options
  • Save pkonieczniak/de6d0cb0c2833c512088444bfc95e8a0 to your computer and use it in GitHub Desktop.
Save pkonieczniak/de6d0cb0c2833c512088444bfc95e8a0 to your computer and use it in GitHub Desktop.
nx&yarn.setup
{
"extends": "nx/presets/npm.json",
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": [
"prebuild",
"build",
"format",
"lint",
"test:e2e:backend",
"test:unit",
"type:check",
"test:e2e:frontend",
"build:lib"
]
}
}
},
"workspaceLayout": {
"appsDir": "packages",
"libsDir": "libs"
},
"targetDefaults": {
"build": {
"dependsOn": [
"^build"
]
},
"build:lib": {
"dependsOn": [
"^build"
]
}
},
"affected": {
"defaultBase": "HEAD~1"
}
}
{
"name": "foobar",
"version": "1.0.0",
"private": true,
"description": "",
"keywords": [],
"license": "ISC",
"author": "",
"workspaces": [
"packages/*",
"libs/*"
],
"scripts": {
"prepare": "sh ./prepare.sh",
"clean": "rm -rf packages/node_modules & rm -rf libs/node_modules/",
"clean:all": "yarn clean & rm -rf node_modules",
"install:clean": "yarn install --immutable",
"type:check:all": "nx run-many --target=type:check",
"type:check:affected": "nx affected --target=type:check",
"lint:all": "nx run-many --target=lint",
"lint:affected": "nx affected --target=lint",
"test:unit:all": "nx run-many --target=test:unit",
"test:unit:affected": "nx affected --target=test:unit",
"test:e2e:backend:all": "nx run-many --target=test:e2e:backend",
"test:e2e:backend:affected": "nx affected --target=test:e2e:backend",
"test:e2e:frontend:all": "nx run-many --target=test:e2e:frontend",
"test:e2e:frontend:affected": "nx affected --target=test:e2e:frontend",
"build:all": "nx run-many --target=build",
"build:affected": "nx affected --target=build",
"build:libs:all": "nx run-many --target=build:lib",
"build:libs:affected": "nx affected --target=build:lib",
"start:a": "nx run-many --target=start --output-style=stream --projects=a-front,a-api",
"start:b": "nx run-many --target=start --output-style=stream --projects=b-front,b-api",
"show:affected": "nx affected:graph"
},
"devDependencies": {
"nx": "latest",
//other common dependencies
},
"packageManager": "yarn@3.2.3"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment