mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
feat: move all frontend projects under the same Angular workspace (#1141)
* feat: move all frontend projects under the same Angular workspace * Refactor/angular workspace (#1154) * update frontend build steps Co-authored-by: waterplea <alexander@inkin.ru> Co-authored-by: Matt Hill <matthewonthemoon@gmail.com> Co-authored-by: Lucy Cifferello <12953208+elvece@users.noreply.github.com>
This commit is contained in:
7
frontend/projects/shared/ng-package.json
Normal file
7
frontend/projects/shared/ng-package.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/shared",
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
}
|
||||
}
|
||||
11
frontend/projects/shared/package.json
Normal file
11
frontend/projects/shared/package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "shared",
|
||||
"version": "0.0.1",
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^13.2.0",
|
||||
"@angular/core": "^13.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
}
|
||||
5
frontend/projects/shared/src/public-api.ts
Normal file
5
frontend/projects/shared/src/public-api.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
/*
|
||||
* Public API Surface of shared
|
||||
*/
|
||||
|
||||
export * from './types/workspace-config'
|
||||
20
frontend/projects/shared/src/types/workspace-config.ts
Normal file
20
frontend/projects/shared/src/types/workspace-config.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export type WorkspaceConfig = {
|
||||
useMocks: boolean
|
||||
// each key corresponds to a project and values adjust settings for that project, eg: ui, setup-wizard, diagnostic-ui
|
||||
ui: {
|
||||
gitHash: string
|
||||
patchDb: {
|
||||
poll: {
|
||||
cooldown: number /* in ms */
|
||||
}
|
||||
}
|
||||
api: {
|
||||
url: string
|
||||
version: string
|
||||
}
|
||||
mocks: {
|
||||
maskAs: 'tor' | 'lan'
|
||||
skipStartupAlerts: boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
12
frontend/projects/shared/tsconfig.lib.json
Normal file
12
frontend/projects/shared/tsconfig.lib.json
Normal file
@@ -0,0 +1,12 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/lib",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"inlineSources": true,
|
||||
"types": []
|
||||
},
|
||||
"exclude": ["src/test.ts", "**/*.spec.ts"]
|
||||
}
|
||||
10
frontend/projects/shared/tsconfig.lib.prod.json
Normal file
10
frontend/projects/shared/tsconfig.lib.prod.json
Normal file
@@ -0,0 +1,10 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.lib.json",
|
||||
"compilerOptions": {
|
||||
"declarationMap": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"compilationMode": "partial"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user