mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
* feat(nx): add basic-lib generator for streamlined library creation This adds a new nx-plugin library with a generator for creating "common" type Bitwarden libs. It is set up to accept a lib name, description, team, and directory. It then - Creates a folder in the directory (default to libs) - Sets up complete library scaffolding: - README with team ownership - Build, lint and test task configuration - Test infrastructure - Configures TypeScript path mapping - Updates CODEOWNERS with team ownership - Runs npm i This will make library creation more consistent and reduce manual boilerplate setup. The plugin design itself was generated by `npx nx g plugin`. This means we used a plugin to generate a plugin that exports generators. To create our generator generator, we first needed a generator. * fix(dirt/card): correct tsconfig path in jest configuration Fix the relative path to tsconfig.base in the dirt/card library's Jest config. The path was incorrectly using four parent directory traversals (../../../../) when only three (../../../) were needed to reach the project root. * chore(codeowners): clarify some nx ownership stuff
52 lines
1.3 KiB
JSON
52 lines
1.3 KiB
JSON
{
|
|
"name": "nx-plugin",
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"sourceRoot": "libs/nx-plugin/src",
|
|
"projectType": "library",
|
|
"tags": [],
|
|
"targets": {
|
|
"build": {
|
|
"executor": "@nx/js:tsc",
|
|
"outputs": ["{options.outputPath}"],
|
|
"options": {
|
|
"outputPath": "dist/libs/nx-plugin",
|
|
"main": "libs/nx-plugin/src/index.ts",
|
|
"tsConfig": "libs/nx-plugin/tsconfig.lib.json",
|
|
"assets": [
|
|
"libs/nx-plugin/*.md",
|
|
{
|
|
"input": "./libs/nx-plugin/src",
|
|
"glob": "**/!(*.ts)",
|
|
"output": "./src"
|
|
},
|
|
{
|
|
"input": "./libs/nx-plugin/src",
|
|
"glob": "**/*.d.ts",
|
|
"output": "./src"
|
|
},
|
|
{
|
|
"input": "./libs/nx-plugin",
|
|
"glob": "generators.json",
|
|
"output": "."
|
|
},
|
|
{
|
|
"input": "./libs/nx-plugin",
|
|
"glob": "executors.json",
|
|
"output": "."
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"lint": {
|
|
"executor": "@nx/eslint:lint"
|
|
},
|
|
"test": {
|
|
"executor": "@nx/jest:jest",
|
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
"options": {
|
|
"jestConfig": "libs/nx-plugin/jest.config.ts"
|
|
}
|
|
}
|
|
}
|
|
}
|