Skip to content

Commit 51ceaa8

Browse files
committed
feat: versioning plugin for NX
1 parent 560cc3d commit 51ceaa8

File tree

20 files changed

+349
-85
lines changed

20 files changed

+349
-85
lines changed

.commitlintrc.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": [
3+
"@commitlint/config-conventional"
4+
],
5+
"rules": {}
6+
}

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

apps/velo-external-db/project.json

+29-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"targets": {
66
"build": {
77
"executor": "@nrwl/node:webpack",
8-
"outputs": [ "{options.outputPath}" ],
8+
"outputs": [
9+
"{options.outputPath}"
10+
],
911
"options": {
1012
"outputPath": "dist/apps/velo-external-db",
1113
"main": "apps/velo-external-db/src/app.js",
@@ -14,19 +16,32 @@
1416
"progress": true,
1517
"buildLibsFromSource": true,
1618
"assets": [
17-
{ "glob": "**/*", "input": "libs/velo-external-db-core/src/views", "output": "./views" },
18-
{ "glob": "**/*", "input": "libs/velo-external-db-core/src/assets", "output": "./assets" }
19+
{
20+
"glob": "**/*",
21+
"input": "libs/velo-external-db-core/src/views",
22+
"output": "./views"
23+
},
24+
{
25+
"glob": "**/*",
26+
"input": "libs/velo-external-db-core/src/assets",
27+
"output": "./assets"
28+
}
1929
],
2030
"fileReplacements": [
21-
{ "replace": "apps/velo-external-db/src/environments/environment.js", "with": "apps/velo-external-db/src/environments/environment.prod.js" },
22-
{ "replace": "libs/velo-external-db-core/src/utils/router_utils.js", "with": "libs/velo-external-db-core/src/utils/router_utils.build.js" }
31+
{
32+
"replace": "apps/velo-external-db/src/environments/environment.js",
33+
"with": "apps/velo-external-db/src/environments/environment.prod.js"
34+
},
35+
{
36+
"replace": "libs/velo-external-db-core/src/utils/router_utils.js",
37+
"with": "libs/velo-external-db-core/src/utils/router_utils.build.js"
38+
}
2339
]
2440
},
2541
"configurations": {
2642
"production": {
2743
"optimization": true,
2844
"inspect": false
29-
3045
}
3146
}
3247
},
@@ -56,17 +71,22 @@
5671
"jestConfig": "apps/velo-external-db/jest.config.js",
5772
"passWithNoTests": true
5873
}
59-
},
60-
74+
},
6175
"build-image": {
62-
"builder": "@nrwl/workspace:run-commands",
76+
"executor": "@nrwl/workspace:run-commands",
6377
"options": {
6478
"commands": [
6579
"nx run velo-external-db:build",
6680
"docker build -f ./apps/velo-external-db/Dockerfile . -t velo-external-db"
6781
],
6882
"parallel": false
6983
}
84+
},
85+
"version": {
86+
"executor": "@jscutlery/semver:version",
87+
"options": {
88+
"preset": "conventional"
89+
}
7090
}
7191
},
7292
"tags": []

libs/external-db-airtable/project.json

+21-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
"targets": {
66
"build": {
77
"executor": "@nrwl/js:tsc",
8-
"outputs": [ "{options.outputPath}" ],
8+
"outputs": [
9+
"{options.outputPath}"
10+
],
911
"options": {
1012
"outputPath": "dist/libs/external-db-airtable",
1113
"main": "libs/external-db-airtable/src/index.js",
1214
"tsConfig": "libs/external-db-airtable/tsconfig.lib.json",
13-
"assets": [ "libs/external-db-airtable/*.md" ],
15+
"assets": [
16+
"libs/external-db-airtable/*.md"
17+
],
1418
"buildableProjectDepsInPackageJsonType": "dependencies"
1519
}
1620
},
@@ -28,18 +32,30 @@
2832
},
2933
"lint": {
3034
"executor": "@nrwl/linter:eslint",
31-
"outputs": [ "{options.outputFile}" ],
35+
"outputs": [
36+
"{options.outputFile}"
37+
],
3238
"options": {
33-
"lintFilePatterns": [ "libs/external-db-airtable/**/*.js" ]
39+
"lintFilePatterns": [
40+
"libs/external-db-airtable/**/*.js"
41+
]
3442
}
3543
},
3644
"test": {
3745
"executor": "@nrwl/jest:jest",
38-
"outputs": [ "coverage/libs/external-db-airtable" ],
46+
"outputs": [
47+
"coverage/libs/external-db-airtable"
48+
],
3949
"options": {
4050
"jestConfig": "libs/external-db-airtable/jest.config.js",
4151
"passWithNoTests": true
4252
}
53+
},
54+
"version": {
55+
"executor": "@jscutlery/semver:version",
56+
"options": {
57+
"preset": "conventional"
58+
}
4359
}
4460
},
4561
"tags": []

libs/external-db-bigquery/project.json

+21-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
"targets": {
66
"build": {
77
"executor": "@nrwl/js:tsc",
8-
"outputs": [ "{options.outputPath}" ],
8+
"outputs": [
9+
"{options.outputPath}"
10+
],
911
"options": {
1012
"outputPath": "dist/libs/external-db-bigquery",
1113
"main": "libs/external-db-bigquery/src/index.js",
1214
"tsConfig": "libs/external-db-bigquery/tsconfig.lib.json",
13-
"assets": [ "libs/external-db-bigquery/*.md" ],
15+
"assets": [
16+
"libs/external-db-bigquery/*.md"
17+
],
1418
"buildableProjectDepsInPackageJsonType": "dependencies"
1519
}
1620
},
@@ -28,18 +32,30 @@
2832
},
2933
"lint": {
3034
"executor": "@nrwl/linter:eslint",
31-
"outputs": [ "{options.outputFile}" ],
35+
"outputs": [
36+
"{options.outputFile}"
37+
],
3238
"options": {
33-
"lintFilePatterns": [ "libs/external-db-bigquery/**/*.js" ]
39+
"lintFilePatterns": [
40+
"libs/external-db-bigquery/**/*.js"
41+
]
3442
}
3543
},
3644
"test": {
3745
"executor": "@nrwl/jest:jest",
38-
"outputs": [ "coverage/libs/external-db-bigquery" ],
46+
"outputs": [
47+
"coverage/libs/external-db-bigquery"
48+
],
3949
"options": {
4050
"jestConfig": "libs/external-db-bigquery/jest.config.js",
4151
"passWithNoTests": true
4252
}
53+
},
54+
"version": {
55+
"executor": "@jscutlery/semver:version",
56+
"options": {
57+
"preset": "conventional"
58+
}
4359
}
4460
},
4561
"tags": []

libs/external-db-config/project.json

+21-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
"targets": {
66
"build": {
77
"executor": "@nrwl/js:tsc",
8-
"outputs": ["{options.outputPath}"],
8+
"outputs": [
9+
"{options.outputPath}"
10+
],
911
"options": {
1012
"outputPath": "dist/libs/external-db-config",
1113
"main": "libs/external-db-config/src/index.js",
1214
"tsConfig": "libs/external-db-config/tsconfig.lib.json",
13-
"assets": ["libs/external-db-config/*.md"],
15+
"assets": [
16+
"libs/external-db-config/*.md"
17+
],
1418
"buildableProjectDepsInPackageJsonType": "dependencies"
1519
}
1620
},
@@ -28,18 +32,30 @@
2832
},
2933
"lint": {
3034
"executor": "@nrwl/linter:eslint",
31-
"outputs": ["{options.outputFile}"],
35+
"outputs": [
36+
"{options.outputFile}"
37+
],
3238
"options": {
33-
"lintFilePatterns": ["libs/external-db-config/**/*.js"]
39+
"lintFilePatterns": [
40+
"libs/external-db-config/**/*.js"
41+
]
3442
}
3543
},
3644
"test": {
3745
"executor": "@nrwl/jest:jest",
38-
"outputs": ["coverage/libs/external-db-config"],
46+
"outputs": [
47+
"coverage/libs/external-db-config"
48+
],
3949
"options": {
4050
"jestConfig": "libs/external-db-config/jest.config.js",
4151
"passWithNoTests": true
4252
}
53+
},
54+
"version": {
55+
"executor": "@jscutlery/semver:version",
56+
"options": {
57+
"preset": "conventional"
58+
}
4359
}
4460
},
4561
"tags": []

libs/external-db-dynamodb/project.json

+21-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
"targets": {
66
"build": {
77
"executor": "@nrwl/js:tsc",
8-
"outputs": [ "{options.outputPath}" ],
8+
"outputs": [
9+
"{options.outputPath}"
10+
],
911
"options": {
1012
"outputPath": "dist/libs/external-db-dynamodb",
1113
"main": "libs/external-db-dynamodb/src/index.js",
1214
"tsConfig": "libs/external-db-dynamodb/tsconfig.lib.json",
13-
"assets": [ "libs/external-db-dynamodb/*.md" ],
15+
"assets": [
16+
"libs/external-db-dynamodb/*.md"
17+
],
1418
"buildableProjectDepsInPackageJsonType": "dependencies"
1519
}
1620
},
@@ -28,18 +32,30 @@
2832
},
2933
"lint": {
3034
"executor": "@nrwl/linter:eslint",
31-
"outputs": [ "{options.outputFile}" ],
35+
"outputs": [
36+
"{options.outputFile}"
37+
],
3238
"options": {
33-
"lintFilePatterns": [ "libs/external-db-dynamodb/**/*.js" ]
39+
"lintFilePatterns": [
40+
"libs/external-db-dynamodb/**/*.js"
41+
]
3442
}
3543
},
3644
"test": {
3745
"executor": "@nrwl/jest:jest",
38-
"outputs": [ "coverage/libs/external-db-dynamodb" ],
46+
"outputs": [
47+
"coverage/libs/external-db-dynamodb"
48+
],
3949
"options": {
4050
"jestConfig": "libs/external-db-dynamodb/jest.config.js",
4151
"passWithNoTests": true
4252
}
53+
},
54+
"version": {
55+
"executor": "@jscutlery/semver:version",
56+
"options": {
57+
"preset": "conventional"
58+
}
4359
}
4460
},
4561
"tags": []

libs/external-db-firestore/project.json

+18-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
"targets": {
66
"build": {
77
"executor": "@nrwl/js:tsc",
8-
"outputs": [ "{options.outputPath}" ],
8+
"outputs": [
9+
"{options.outputPath}"
10+
],
911
"options": {
1012
"outputPath": "dist/libs/external-db-firestore",
1113
"main": "libs/external-db-firestore/src/index.js",
1214
"tsConfig": "libs/external-db-firestore/tsconfig.lib.json",
13-
"assets": [ "libs/external-db-firestore/*.md" ],
15+
"assets": [
16+
"libs/external-db-firestore/*.md"
17+
],
1418
"buildableProjectDepsInPackageJsonType": "dependencies"
1519
}
1620
},
@@ -32,16 +36,26 @@
3236
"{options.outputFile}"
3337
],
3438
"options": {
35-
"lintFilePatterns": [ "libs/external-db-firestore/**/*.js" ]
39+
"lintFilePatterns": [
40+
"libs/external-db-firestore/**/*.js"
41+
]
3642
}
3743
},
3844
"test": {
3945
"executor": "@nrwl/jest:jest",
40-
"outputs": [ "coverage/libs/external-db-firestore" ],
46+
"outputs": [
47+
"coverage/libs/external-db-firestore"
48+
],
4149
"options": {
4250
"jestConfig": "libs/external-db-firestore/jest.config.js",
4351
"passWithNoTests": true
4452
}
53+
},
54+
"version": {
55+
"executor": "@jscutlery/semver:version",
56+
"options": {
57+
"preset": "conventional"
58+
}
4559
}
4660
},
4761
"tags": []

0 commit comments

Comments
 (0)