Skip to content

Commit

Permalink
chore: rename packages to lib
Browse files Browse the repository at this point in the history
  • Loading branch information
kasir-barati committed May 16, 2024
1 parent 485f4b1 commit 6c9c4b7
Show file tree
Hide file tree
Showing 148 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion apps/backend/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Config } from 'jest';
// I was not able to use @shared even though VSCode suggests it. So I had to use relative path
// eslint-disable-next-line @nx/enforce-module-boundaries
import { NodeEnv } from '../../packages/shared/src';
import { NodeEnv } from '../../libs/shared/src';

process.env.NODE_ENV = NodeEnv.test;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export default {
],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../../coverage/packages/backend/auth',
coverageDirectory: '../../../coverage/libs/backend/auth',
} satisfies Config;
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@backend/auth",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/backend/auth/src",
"sourceRoot": "libs/backend/auth/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/backend/auth",
"main": "packages/backend/auth/src/index.ts",
"tsConfig": "packages/backend/auth/tsconfig.lib.json",
"assets": ["packages/backend/auth/*.md"]
"outputPath": "dist/libs/backend/auth",
"main": "libs/backend/auth/src/index.ts",
"tsConfig": "libs/backend/auth/tsconfig.lib.json",
"assets": ["libs/backend/auth/*.md"]
}
}
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export default {
],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../../coverage/packages/backend/common',
coverageDirectory: '../../../coverage/libs/backend/common',
};
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@backend/common",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/backend/common/src",
"sourceRoot": "libs/backend/common/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/backend/common",
"main": "packages/backend/common/src/index.ts",
"tsConfig": "packages/backend/common/tsconfig.lib.json",
"assets": ["packages/backend/common/*.md"]
"outputPath": "dist/libs/backend/common",
"main": "libs/backend/common/src/index.ts",
"tsConfig": "libs/backend/common/tsconfig.lib.json",
"assets": ["libs/backend/common/*.md"]
}
}
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export default {
],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../../coverage/packages/backend/logger',
coverageDirectory: '../../../coverage/libs/backend/logger',
} satisfies Config;
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@backend/logger",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/backend/logger/src",
"sourceRoot": "libs/backend/logger/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/backend/logger",
"main": "packages/backend/logger/src/index.ts",
"tsConfig": "packages/backend/logger/tsconfig.lib.json",
"assets": ["packages/backend/logger/*.md"]
"outputPath": "dist/libs/backend/logger",
"main": "libs/backend/logger/src/index.ts",
"tsConfig": "libs/backend/logger/tsconfig.lib.json",
"assets": ["libs/backend/logger/*.md"]
}
}
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions packages/shared/project.json → libs/shared/project.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "@shared",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/shared/src",
"sourceRoot": "libs/shared/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/shared",
"main": "packages/shared/src/index.ts",
"tsConfig": "packages/shared/tsconfig.lib.json",
"assets": ["packages/shared/*.md"]
"outputPath": "dist/libs/shared",
"main": "libs/shared/src/index.ts",
"tsConfig": "libs/shared/tsconfig.lib.json",
"assets": ["libs/shared/*.md"]
}
},
"test": {
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "packages/shared/jest.config.ts",
"jestConfig": "libs/shared/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"skipDefaultLibCheck": true,
"baseUrl": ".",
"paths": {
"@backend/auth": ["packages/backend/auth/src/index.ts"],
"@backend/common": ["packages/backend/common/src/index.ts"],
"@backend/logger": ["packages/backend/logger/src/index.ts"],
"@shared": ["packages/shared/src/index.ts"]
"@backend/auth": ["libs/backend/auth/src/index.ts"],
"@backend/common": ["libs/backend/common/src/index.ts"],
"@backend/logger": ["libs/backend/logger/src/index.ts"],
"@shared": ["libs/shared/src/index.ts"]
}
},
"exclude": ["node_modules", "tmp"]
Expand Down

0 comments on commit 6c9c4b7

Please sign in to comment.