From 729eb04dfa64245e8e3264da87b90b113029b9e1 Mon Sep 17 00:00:00 2001 From: Alex Inkin Date: Mon, 17 Oct 2022 19:55:34 +0300 Subject: [PATCH] feat: setup publishing of share and marketplace packages (#1874) --- frontend/angular.json | 10 ++-------- frontend/package.json | 4 ++++ frontend/projects/marketplace/package.json | 1 + .../projects/marketplace/tsconfig.prod.json | 10 ---------- frontend/projects/shared/tsconfig.prod.json | 10 ---------- frontend/tsconfig.lib.json | 19 +++++++++++++++++++ 6 files changed, 26 insertions(+), 28 deletions(-) delete mode 100644 frontend/projects/marketplace/tsconfig.prod.json delete mode 100644 frontend/projects/shared/tsconfig.prod.json create mode 100644 frontend/tsconfig.lib.json diff --git a/frontend/angular.json b/frontend/angular.json index 2e5e7a5b6..99fd975c8 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -392,10 +392,7 @@ }, "configurations": { "production": { - "tsConfig": "projects/marketplace/tsconfig.prod.json" - }, - "development": { - "tsConfig": "projects/marketplace/tsconfig.json" + "tsConfig": "tsconfig.lib.json" } }, "defaultConfiguration": "production" @@ -415,10 +412,7 @@ }, "configurations": { "production": { - "tsConfig": "projects/shared/tsconfig.prod.json" - }, - "development": { - "tsConfig": "projects/shared/tsconfig.json" + "tsConfig": "tsconfig.lib.json" } }, "defaultConfiguration": "production" diff --git a/frontend/package.json b/frontend/package.json index 42dc2c44a..9fad4c685 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,6 +15,10 @@ "build:setup": "ng run setup-wizard:build", "build:ui": "ng run ui:build", "build:all": "npm run build:deps && npm run build:dui && npm run build:setup && npm run build:ui", + "build:shared": "ng build shared", + "build:marketplace": "npm run build:shared && ng build marketplace", + "publish:shared": "npm run build:shared && npm publish ./dist/shared", + "publish:marketplace": "npm run build:marketplace && npm publish ./dist/marketplace", "start:dui": "npm run-script build-config && ionic serve --project diagnostic-ui --host 0.0.0.0", "start:setup": "npm run-script build-config && ionic serve --project setup-wizard --host 0.0.0.0", "start:ui": "npm run-script build-config && ionic serve --project ui --ip --host 0.0.0.0", diff --git a/frontend/projects/marketplace/package.json b/frontend/projects/marketplace/package.json index 04f3be2f4..2af6483da 100644 --- a/frontend/projects/marketplace/package.json +++ b/frontend/projects/marketplace/package.json @@ -4,6 +4,7 @@ "peerDependencies": { "@angular/common": "^13.2.0", "@angular/core": "^13.2.0", + "@ionic/angular": "^6.0.3", "@start9labs/shared": "^0.0.1", "fuse.js": "^6.4.6" }, diff --git a/frontend/projects/marketplace/tsconfig.prod.json b/frontend/projects/marketplace/tsconfig.prod.json deleted file mode 100644 index 06de549e1..000000000 --- a/frontend/projects/marketplace/tsconfig.prod.json +++ /dev/null @@ -1,10 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.lib.json", - "compilerOptions": { - "declarationMap": false - }, - "angularCompilerOptions": { - "compilationMode": "partial" - } -} diff --git a/frontend/projects/shared/tsconfig.prod.json b/frontend/projects/shared/tsconfig.prod.json deleted file mode 100644 index 06de549e1..000000000 --- a/frontend/projects/shared/tsconfig.prod.json +++ /dev/null @@ -1,10 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.lib.json", - "compilerOptions": { - "declarationMap": false - }, - "angularCompilerOptions": { - "compilationMode": "partial" - } -} diff --git a/frontend/tsconfig.lib.json b/frontend/tsconfig.lib.json new file mode 100644 index 000000000..0dd228bf9 --- /dev/null +++ b/frontend/tsconfig.lib.json @@ -0,0 +1,19 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "baseUrl": "./", + "outDir": "../../out-tsc/lib", + "declaration": true, + "declarationMap": false, + "inlineSources": true, + "types": [], + "paths": { + "@start9labs/marketplace": ["dist/marketplace"], + "@start9labs/shared": ["dist/shared"] + } + }, + "angularCompilerOptions": { + "compilationMode": "partial" + } +}