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:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
41
libs/tools/export/vault-export/vault-export-ui/project.json
Normal file
41
libs/tools/export/vault-export/vault-export-ui/project.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
41
libs/tools/generator/components/project.json
Normal file
41
libs/tools/generator/components/project.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
41
libs/tools/generator/core/project.json
Normal file
41
libs/tools/generator/core/project.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
41
libs/tools/generator/extensions/history/project.json
Normal file
41
libs/tools/generator/extensions/history/project.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
41
libs/tools/generator/extensions/legacy/project.json
Normal file
41
libs/tools/generator/extensions/legacy/project.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
41
libs/tools/generator/extensions/navigation/project.json
Normal file
41
libs/tools/generator/extensions/navigation/project.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
41
libs/tools/send/send-ui/project.json
Normal file
41
libs/tools/send/send-ui/project.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user