Skip to content

Commit

Permalink
ci: add prepublish target (#7903)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Jun 21, 2024
1 parent 4fb329d commit a780f18
Show file tree
Hide file tree
Showing 19 changed files with 320 additions and 176 deletions.
29 changes: 19 additions & 10 deletions projects/addon-charts/project.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "addon-charts",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "projects/addon-charts",
"sourceRoot": "projects/{projectName}",
"projectType": "library",
"prefix": "tui",
"implicitDependencies": ["!testing"],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"outputs": ["{workspaceRoot}/dist/addon-charts"],
"outputs": ["{workspaceRoot}/dist/{projectName}"],
"options": {
"tsConfig": "tsconfig.build.json",
"project": "{projectRoot}/ng-package.json"
Expand All @@ -23,23 +23,32 @@
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/addon-charts"],
"outputs": ["{workspaceRoot}/coverage/{projectName}"],
"options": {
"jestConfig": "jest.config.ts",
"coverageDirectory": "coverage/addon-charts",
"coverageDirectory": "coverage/{projectName}",
"collectCoverageFrom": ["<rootDir>/{projectRoot}/**/*.ts"],
"testMatch": ["<rootDir>/{projectRoot}/**/*.spec.ts"]
}
},
"publish": {
"prepublish": {
"executor": "nx:run-commands",
"options": {
"commands": [
"cp ./LICENSE ./dist/addon-charts",
"ts-node ./scripts/publish.ts --path ./dist/addon-charts --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
],
"parallel": false
"command": "cp ./LICENSE ./dist/{projectName}"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"commands": "ts-node ./scripts/publish.ts --path ./dist/{projectName} --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
},
"dependsOn": [
{
"target": "prepublish",
"params": "ignore",
"dependencies": false
}
]
}
}
}
29 changes: 19 additions & 10 deletions projects/addon-commerce/project.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "addon-commerce",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "projects/addon-commerce",
"sourceRoot": "projects/{projectName}",
"projectType": "library",
"prefix": "tui",
"implicitDependencies": ["!testing"],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"outputs": ["{workspaceRoot}/dist/addon-commerce"],
"outputs": ["{workspaceRoot}/dist/{projectName}"],
"options": {
"tsConfig": "tsconfig.build.json",
"project": "{projectRoot}/ng-package.json"
Expand All @@ -23,23 +23,32 @@
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/addon-commerce"],
"outputs": ["{workspaceRoot}/coverage/{projectName}"],
"options": {
"jestConfig": "jest.config.ts",
"coverageDirectory": "coverage/addon-commerce",
"coverageDirectory": "coverage/{projectName}",
"collectCoverageFrom": ["<rootDir>/{projectRoot}/**/*.ts"],
"testMatch": ["<rootDir>/{projectRoot}/**/*.spec.ts"]
}
},
"publish": {
"prepublish": {
"executor": "nx:run-commands",
"options": {
"commands": [
"cp ./LICENSE ./dist/addon-commerce",
"ts-node ./scripts/publish.ts --path ./dist/addon-commerce --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
],
"parallel": false
"command": "cp ./LICENSE ./dist/{projectName}"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"commands": "ts-node ./scripts/publish.ts --path ./dist/{projectName} --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
},
"dependsOn": [
{
"target": "prepublish",
"params": "ignore",
"dependencies": false
}
]
}
}
}
29 changes: 19 additions & 10 deletions projects/addon-doc/project.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "addon-doc",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "projects/addon-doc",
"sourceRoot": "projects/{projectName}",
"projectType": "library",
"prefix": "tui",
"implicitDependencies": ["!testing"],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"outputs": ["{workspaceRoot}/dist/addon-doc"],
"outputs": ["{workspaceRoot}/dist/{projectName}"],
"options": {
"tsConfig": "tsconfig.build.json",
"project": "{projectRoot}/ng-package.json"
Expand All @@ -23,23 +23,32 @@
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/addon-doc"],
"outputs": ["{workspaceRoot}/coverage/{projectName}"],
"options": {
"jestConfig": "jest.config.ts",
"coverageDirectory": "coverage/addon-doc",
"coverageDirectory": "coverage/{projectName}",
"collectCoverageFrom": ["<rootDir>/{projectRoot}/**/*.ts"],
"testMatch": ["<rootDir>/{projectRoot}/**/*.spec.ts"]
}
},
"publish": {
"prepublish": {
"executor": "nx:run-commands",
"options": {
"commands": [
"cp ./LICENSE ./dist/addon-doc",
"ts-node ./scripts/publish.ts --path ./dist/addon-doc --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
],
"parallel": false
"command": "cp ./LICENSE ./dist/{projectName}"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"commands": "ts-node ./scripts/publish.ts --path ./dist/{projectName} --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
},
"dependsOn": [
{
"target": "prepublish",
"params": "ignore",
"dependencies": false
}
]
}
}
}
29 changes: 19 additions & 10 deletions projects/addon-mobile/project.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "addon-mobile",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "projects/addon-mobile",
"sourceRoot": "projects/{projectName}",
"projectType": "library",
"prefix": "tui",
"implicitDependencies": ["!testing"],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"outputs": ["{workspaceRoot}/dist/addon-mobile"],
"outputs": ["{workspaceRoot}/dist/{projectName}"],
"options": {
"tsConfig": "tsconfig.build.json",
"project": "{projectRoot}/ng-package.json"
Expand All @@ -23,23 +23,32 @@
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/addon-mobile"],
"outputs": ["{workspaceRoot}/coverage/{projectName}"],
"options": {
"jestConfig": "jest.config.ts",
"coverageDirectory": "coverage/addon-mobile",
"coverageDirectory": "coverage/{projectName}",
"collectCoverageFrom": ["<rootDir>/{projectRoot}/**/*.ts"],
"testMatch": ["<rootDir>/{projectRoot}/**/*.spec.ts"]
}
},
"publish": {
"prepublish": {
"executor": "nx:run-commands",
"options": {
"commands": [
"cp ./LICENSE ./dist/addon-mobile",
"ts-node ./scripts/publish.ts --path ./dist/addon-mobile --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
],
"parallel": false
"command": "cp ./LICENSE ./dist/{projectName}"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"commands": "ts-node ./scripts/publish.ts --path ./dist/{projectName} --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
},
"dependsOn": [
{
"target": "prepublish",
"params": "ignore",
"dependencies": false
}
]
}
}
}
27 changes: 18 additions & 9 deletions projects/addon-table/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "addon-table",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "projects/addon-table",
"sourceRoot": "projects/{projectName}",
"projectType": "library",
"prefix": "tui",
"implicitDependencies": ["!testing"],
Expand All @@ -23,23 +23,32 @@
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/addon-table"],
"outputs": ["{workspaceRoot}/coverage/{projectName}"],
"options": {
"jestConfig": "jest.config.ts",
"coverageDirectory": "coverage/addon-table",
"coverageDirectory": "coverage/{projectName}",
"collectCoverageFrom": ["<rootDir>/{projectRoot}/**/*.ts"],
"testMatch": ["<rootDir>/{projectRoot}/**/*.spec.ts"]
}
},
"publish": {
"prepublish": {
"executor": "nx:run-commands",
"options": {
"commands": [
"cp ./LICENSE ./dist/addon-table",
"ts-node ./scripts/publish.ts --path ./dist/addon-table --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
],
"parallel": false
"command": "cp ./LICENSE ./dist/{projectName}"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"commands": "ts-node ./scripts/publish.ts --path ./dist/{projectName} --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
},
"dependsOn": [
{
"target": "prepublish",
"params": "ignore",
"dependencies": false
}
]
}
}
}
31 changes: 20 additions & 11 deletions projects/cdk/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cdk",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "projects/cdk",
"sourceRoot": "projects/{projectName}",
"projectType": "library",
"prefix": "tui",
"implicitDependencies": ["!testing", "!core", "!styles"],
Expand All @@ -25,7 +25,7 @@
"outputs": ["{workspaceRoot}/dist/cdk"],
"options": {
"parallel": false,
"commands": ["nx prebuild cdk", "nx postbuild cdk"]
"commands": ["nx prebuild {projectName}", "nx postbuild {projectName}"]
}
},
"postbuild": {
Expand All @@ -37,7 +37,7 @@
"schematics": {
"executor": "nx:run-commands",
"options": {
"command": "schematics ./dist/cdk:updateToV{args.v} --allow-private --dry-run true"
"command": "schematics ./dist/{projectName}:updateToV{args.v} --allow-private --dry-run true"
},
"dependsOn": [
{
Expand All @@ -48,10 +48,10 @@
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/cdk"],
"outputs": ["{workspaceRoot}/coverage/{projectName}"],
"options": {
"jestConfig": "jest.config.ts",
"coverageDirectory": "coverage/cdk",
"coverageDirectory": "coverage/{projectName}",
"collectCoverageFrom": ["<rootDir>/{projectRoot}/**/*.ts"],
"testMatch": ["<rootDir>/{projectRoot}/**/*.spec.ts"]
},
Expand All @@ -62,15 +62,24 @@
}
]
},
"publish": {
"prepublish": {
"executor": "nx:run-commands",
"options": {
"commands": [
"cp ./LICENSE ./dist/cdk",
"ts-node ./scripts/publish.ts --path ./dist/cdk --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
],
"parallel": false
"command": "cp ./LICENSE ./dist/{projectName}"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"commands": "ts-node ./scripts/publish.ts --path ./dist/{projectName} --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
},
"dependsOn": [
{
"target": "prepublish",
"params": "ignore",
"dependencies": false
}
]
}
}
}
Loading

0 comments on commit a780f18

Please sign in to comment.