1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

build: add nx configuration to tools nested libraries (#16564)

Add Nx project.json configurations and test scripts to all 8 nested libraries:
- @bitwarden/send-ui
- @bitwarden/generator-core
- @bitwarden/generator-components
- @bitwarden/vault-export-core
- @bitwarden/vault-export-ui
- @bitwarden/generator-history
- @bitwarden/generator-legacy
- @bitwarden/generator-navigation

All libraries now have working nx build, nx lint, and nx test commands.
This commit is contained in:
Addison Beck
2025-09-23 16:52:17 -04:00
committed by GitHub
parent 6837e3a674
commit 092c95d11f
16 changed files with 344 additions and 8 deletions

View File

@@ -15,6 +15,7 @@
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && tsc",
"build:watch": "npm run clean && tsc -watch"
"build:watch": "npm run clean && tsc -watch",
"test": "jest"
}
}

View File

@@ -0,0 +1,41 @@
{
"name": "@bitwarden/vault-export-core",
"$schema": "../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/tools/export/vault-export/vault-export-core/src",
"projectType": "library",
"tags": ["scope:vault-export-core", "type:lib"],
"targets": {
"build": {
"executor": "nx:run-script",
"dependsOn": [],
"options": {
"script": "build"
}
},
"build:watch": {
"executor": "nx:run-script",
"options": {
"script": "build:watch"
}
},
"clean": {
"executor": "nx:run-script",
"options": {
"script": "clean"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/tools/export/vault-export/vault-export-core/**/*.ts"]
}
},
"test": {
"executor": "nx:run-script",
"options": {
"script": "test"
}
}
}
}

View File

@@ -15,6 +15,7 @@
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && tsc",
"build:watch": "npm run clean && tsc -watch"
"build:watch": "npm run clean && tsc -watch",
"test": "jest --passWithNoTests"
}
}

View File

@@ -0,0 +1,41 @@
{
"name": "@bitwarden/vault-export-ui",
"$schema": "../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/tools/export/vault-export/vault-export-ui/src",
"projectType": "library",
"tags": ["scope:vault-export-ui", "type:lib"],
"targets": {
"build": {
"executor": "nx:run-script",
"dependsOn": [],
"options": {
"script": "build"
}
},
"build:watch": {
"executor": "nx:run-script",
"options": {
"script": "build:watch"
}
},
"clean": {
"executor": "nx:run-script",
"options": {
"script": "clean"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/tools/export/vault-export/vault-export-ui/**/*.ts"]
}
},
"test": {
"executor": "nx:run-script",
"options": {
"script": "test"
}
}
}
}

View File

@@ -15,6 +15,7 @@
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && tsc",
"build:watch": "npm run clean && tsc -watch"
"build:watch": "npm run clean && tsc -watch",
"test": "jest --passWithNoTests"
}
}

View File

@@ -0,0 +1,41 @@
{
"name": "@bitwarden/generator-components",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/tools/generator/components/src",
"projectType": "library",
"tags": ["scope:generator-components", "type:lib"],
"targets": {
"build": {
"executor": "nx:run-script",
"dependsOn": [],
"options": {
"script": "build"
}
},
"build:watch": {
"executor": "nx:run-script",
"options": {
"script": "build:watch"
}
},
"clean": {
"executor": "nx:run-script",
"options": {
"script": "clean"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/tools/generator/components/**/*.ts"]
}
},
"test": {
"executor": "nx:run-script",
"options": {
"script": "test"
}
}
}
}

View File

@@ -15,6 +15,7 @@
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && tsc",
"build:watch": "npm run clean && tsc -watch"
"build:watch": "npm run clean && tsc -watch",
"test": "jest"
}
}

View File

@@ -0,0 +1,41 @@
{
"name": "@bitwarden/generator-core",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/tools/generator/core/src",
"projectType": "library",
"tags": ["scope:generator-core", "type:lib"],
"targets": {
"build": {
"executor": "nx:run-script",
"dependsOn": [],
"options": {
"script": "build"
}
},
"build:watch": {
"executor": "nx:run-script",
"options": {
"script": "build:watch"
}
},
"clean": {
"executor": "nx:run-script",
"options": {
"script": "clean"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/tools/generator/core/**/*.ts"]
}
},
"test": {
"executor": "nx:run-script",
"options": {
"script": "test"
}
}
}
}

View File

@@ -15,6 +15,7 @@
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && tsc",
"build:watch": "npm run clean && tsc -watch"
"build:watch": "npm run clean && tsc -watch",
"test": "jest"
}
}

View File

@@ -0,0 +1,41 @@
{
"name": "@bitwarden/generator-history",
"$schema": "../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/tools/generator/extensions/history/src",
"projectType": "library",
"tags": ["scope:generator-history", "type:lib"],
"targets": {
"build": {
"executor": "nx:run-script",
"dependsOn": [],
"options": {
"script": "build"
}
},
"build:watch": {
"executor": "nx:run-script",
"options": {
"script": "build:watch"
}
},
"clean": {
"executor": "nx:run-script",
"options": {
"script": "clean"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/tools/generator/extensions/history/**/*.ts"]
}
},
"test": {
"executor": "nx:run-script",
"options": {
"script": "test"
}
}
}
}

View File

@@ -15,6 +15,7 @@
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && tsc",
"build:watch": "npm run clean && tsc -watch"
"build:watch": "npm run clean && tsc -watch",
"test": "jest"
}
}

View File

@@ -0,0 +1,41 @@
{
"name": "@bitwarden/generator-legacy",
"$schema": "../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/tools/generator/extensions/legacy/src",
"projectType": "library",
"tags": ["scope:generator-legacy", "type:lib"],
"targets": {
"build": {
"executor": "nx:run-script",
"dependsOn": [],
"options": {
"script": "build"
}
},
"build:watch": {
"executor": "nx:run-script",
"options": {
"script": "build:watch"
}
},
"clean": {
"executor": "nx:run-script",
"options": {
"script": "clean"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/tools/generator/extensions/legacy/**/*.ts"]
}
},
"test": {
"executor": "nx:run-script",
"options": {
"script": "test"
}
}
}
}

View File

@@ -15,6 +15,7 @@
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && tsc",
"build:watch": "npm run clean && tsc -watch"
"build:watch": "npm run clean && tsc -watch",
"test": "jest"
}
}

View File

@@ -0,0 +1,41 @@
{
"name": "@bitwarden/generator-navigation",
"$schema": "../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/tools/generator/extensions/navigation/src",
"projectType": "library",
"tags": ["scope:generator-navigation", "type:lib"],
"targets": {
"build": {
"executor": "nx:run-script",
"dependsOn": [],
"options": {
"script": "build"
}
},
"build:watch": {
"executor": "nx:run-script",
"options": {
"script": "build:watch"
}
},
"clean": {
"executor": "nx:run-script",
"options": {
"script": "clean"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/tools/generator/extensions/navigation/**/*.ts"]
}
},
"test": {
"executor": "nx:run-script",
"options": {
"script": "test"
}
}
}
}

View File

@@ -15,6 +15,7 @@
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && tsc",
"build:watch": "npm run clean && tsc -watch"
"build:watch": "npm run clean && tsc -watch",
"test": "jest"
}
}

View File

@@ -0,0 +1,41 @@
{
"name": "@bitwarden/send-ui",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/tools/send/send-ui/src",
"projectType": "library",
"tags": ["scope:send-ui", "type:lib"],
"targets": {
"build": {
"executor": "nx:run-script",
"dependsOn": [],
"options": {
"script": "build"
}
},
"build:watch": {
"executor": "nx:run-script",
"options": {
"script": "build:watch"
}
},
"clean": {
"executor": "nx:run-script",
"options": {
"script": "clean"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/tools/send/send-ui/**/*.ts"]
}
},
"test": {
"executor": "nx:run-script",
"options": {
"script": "test"
}
}
}
}