Skip to content

Commit 7cc6a8a

Browse files
committed
refactor: move the flow feature as library
1 parent 11759af commit 7cc6a8a

28 files changed

+468
-34
lines changed

Diff for: angular.json

+33
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,39 @@
8989
}
9090
}
9191
}
92+
},
93+
"flow": {
94+
"projectType": "library",
95+
"root": "projects/flow",
96+
"sourceRoot": "projects/flow/src",
97+
"prefix": "lib",
98+
"architect": {
99+
"build": {
100+
"builder": "@angular-devkit/build-angular:ng-packagr",
101+
"options": {
102+
"project": "projects/flow/ng-package.json"
103+
},
104+
"configurations": {
105+
"production": {
106+
"tsConfig": "projects/flow/tsconfig.lib.prod.json"
107+
},
108+
"development": {
109+
"tsConfig": "projects/flow/tsconfig.lib.json"
110+
}
111+
},
112+
"defaultConfiguration": "production"
113+
},
114+
"test": {
115+
"builder": "@angular-devkit/build-angular:karma",
116+
"options": {
117+
"tsConfig": "projects/flow/tsconfig.spec.json",
118+
"polyfills": [
119+
"zone.js",
120+
"zone.js/testing"
121+
]
122+
}
123+
}
124+
}
92125
}
93126
},
94127
"cli": {

Diff for: package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"autoprefixer": "^10.4.15",
3131
"jest": "^29.7.0",
3232
"jest-preset-angular": "^13.1.2",
33+
"ng-packagr": "^17.0.0",
3334
"postcss": "^8.4.28",
3435
"tailwindcss": "^3.3.3",
3536
"typescript": "~5.2.2"
@@ -38,6 +39,9 @@
3839
"preset": "jest-preset-angular",
3940
"setupFilesAfterEnv": [
4041
"<rootDir>/setup-jest.ts"
41-
]
42+
],
43+
"moduleNameMapper": {
44+
"^flow": "<rootDir>/projects/flow/src/public-api.ts"
45+
}
4246
}
4347
}

0 commit comments

Comments
 (0)