From 20bb91716d2247d3ce87ff0b738263b0299fec9f Mon Sep 17 00:00:00 2001 From: YinChang Date: Thu, 19 Dec 2019 14:07:19 +0800 Subject: [PATCH 1/4] export some component and service in identity account module --- npm/ng-packs/packages/account/src/lib/components/index.ts | 1 + npm/ng-packs/packages/account/src/lib/services/index.ts | 1 + npm/ng-packs/packages/account/src/public-api.ts | 1 + npm/ng-packs/packages/identity/src/lib/components/index.ts | 2 ++ npm/ng-packs/packages/identity/src/public-api.ts | 2 +- 5 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 npm/ng-packs/packages/identity/src/lib/components/index.ts diff --git a/npm/ng-packs/packages/account/src/lib/components/index.ts b/npm/ng-packs/packages/account/src/lib/components/index.ts index a852329e4e..55553c233c 100644 --- a/npm/ng-packs/packages/account/src/lib/components/index.ts +++ b/npm/ng-packs/packages/account/src/lib/components/index.ts @@ -3,3 +3,4 @@ export * from './login/login.component'; export * from './manage-profile/manage-profile.component'; export * from './register/register.component'; export * from './personal-settings/personal-settings.component'; +export * from './tenant-box/tenant-box.component'; \ No newline at end of file diff --git a/npm/ng-packs/packages/account/src/lib/services/index.ts b/npm/ng-packs/packages/account/src/lib/services/index.ts index e69de29bb2..2792f61109 100644 --- a/npm/ng-packs/packages/account/src/lib/services/index.ts +++ b/npm/ng-packs/packages/account/src/lib/services/index.ts @@ -0,0 +1 @@ +export * from './account.service'; \ No newline at end of file diff --git a/npm/ng-packs/packages/account/src/public-api.ts b/npm/ng-packs/packages/account/src/public-api.ts index 0e845f0768..c81bfdc9d6 100644 --- a/npm/ng-packs/packages/account/src/public-api.ts +++ b/npm/ng-packs/packages/account/src/public-api.ts @@ -3,3 +3,4 @@ export * from './lib/components'; export * from './lib/constants/routes'; export * from './lib/tokens'; export * from './lib/models'; +export * from './lib/services'; diff --git a/npm/ng-packs/packages/identity/src/lib/components/index.ts b/npm/ng-packs/packages/identity/src/lib/components/index.ts new file mode 100644 index 0000000000..72100fe930 --- /dev/null +++ b/npm/ng-packs/packages/identity/src/lib/components/index.ts @@ -0,0 +1,2 @@ +export * from './roles/roles.component'; +export * from './users/users.component'; \ No newline at end of file diff --git a/npm/ng-packs/packages/identity/src/public-api.ts b/npm/ng-packs/packages/identity/src/public-api.ts index 1366e9c333..cf63633e97 100644 --- a/npm/ng-packs/packages/identity/src/public-api.ts +++ b/npm/ng-packs/packages/identity/src/public-api.ts @@ -4,7 +4,7 @@ export * from './lib/identity.module'; export * from './lib/actions/identity.actions'; -export * from './lib/components/roles/roles.component'; +export * from './lib/components/index'; export * from './lib/constants/routes'; export * from './lib/models/identity'; export * from './lib/services/identity.service'; From b638685543b0db7c2b271d894a14acdc50da1aa6 Mon Sep 17 00:00:00 2001 From: YinChang Date: Thu, 19 Dec 2019 14:29:51 +0800 Subject: [PATCH 2/4] code format add newline at end --- npm/ng-packs/packages/account/src/lib/components/index.ts | 2 +- npm/ng-packs/packages/account/src/lib/services/index.ts | 2 +- npm/ng-packs/packages/identity/src/lib/components/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/npm/ng-packs/packages/account/src/lib/components/index.ts b/npm/ng-packs/packages/account/src/lib/components/index.ts index 55553c233c..2e2fb8c6bd 100644 --- a/npm/ng-packs/packages/account/src/lib/components/index.ts +++ b/npm/ng-packs/packages/account/src/lib/components/index.ts @@ -3,4 +3,4 @@ export * from './login/login.component'; export * from './manage-profile/manage-profile.component'; export * from './register/register.component'; export * from './personal-settings/personal-settings.component'; -export * from './tenant-box/tenant-box.component'; \ No newline at end of file +export * from './tenant-box/tenant-box.component'; diff --git a/npm/ng-packs/packages/account/src/lib/services/index.ts b/npm/ng-packs/packages/account/src/lib/services/index.ts index 2792f61109..72778be1f1 100644 --- a/npm/ng-packs/packages/account/src/lib/services/index.ts +++ b/npm/ng-packs/packages/account/src/lib/services/index.ts @@ -1 +1 @@ -export * from './account.service'; \ No newline at end of file +export * from './account.service'; diff --git a/npm/ng-packs/packages/identity/src/lib/components/index.ts b/npm/ng-packs/packages/identity/src/lib/components/index.ts index 72100fe930..29c90f5833 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/index.ts +++ b/npm/ng-packs/packages/identity/src/lib/components/index.ts @@ -1,2 +1,2 @@ export * from './roles/roles.component'; -export * from './users/users.component'; \ No newline at end of file +export * from './users/users.component'; From 4007dd6d7ffc5e7593daac14c326acaff3d0e433 Mon Sep 17 00:00:00 2001 From: TheDiaval Date: Thu, 19 Dec 2019 16:12:01 +0300 Subject: [PATCH 3/4] refactor(identity): correct export paths --- npm/ng-packs/packages/identity/src/public-api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm/ng-packs/packages/identity/src/public-api.ts b/npm/ng-packs/packages/identity/src/public-api.ts index cf63633e97..b86c993f13 100644 --- a/npm/ng-packs/packages/identity/src/public-api.ts +++ b/npm/ng-packs/packages/identity/src/public-api.ts @@ -4,8 +4,8 @@ export * from './lib/identity.module'; export * from './lib/actions/identity.actions'; -export * from './lib/components/index'; +export * from './lib/components'; export * from './lib/constants/routes'; export * from './lib/models/identity'; -export * from './lib/services/identity.service'; +export * from './lib/services'; export * from './lib/states/identity.state'; From 30af9d34181c4024698f5968cbe2ecbb252b9fa2 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Thu, 19 Dec 2019 16:47:32 +0300 Subject: [PATCH 4/4] ci(scripts): add prod build script --- npm/ng-packs/package.json | 3 ++- npm/ng-packs/scripts/package.json | 1 + npm/ng-packs/scripts/prod-build.js | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 npm/ng-packs/scripts/prod-build.js diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index 1e8d335ff9..f66eb74303 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -9,8 +9,9 @@ "lint": "ng lint", "scripts:build": "cd scripts && npm install && yarn build", "prepare:workspace": "yarn scripts:build", - "ci": "yarn prepare:workspace && yarn ci:test && yarn ng lint", + "ci": "yarn prepare:workspace && yarn ci:test && yarn ng lint && yarn ci:build", "ci:test": "ng test --coverage=false", + "ci:build": "cd scripts && yarn build:prod", "lerna": "lerna", "generate:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" }, diff --git a/npm/ng-packs/scripts/package.json b/npm/ng-packs/scripts/package.json index 5388e306e9..14e83b6d51 100644 --- a/npm/ng-packs/scripts/package.json +++ b/npm/ng-packs/scripts/package.json @@ -6,6 +6,7 @@ "modules": "[build.js, sync.js]", "scripts": { "build": "node -r esm build.js", + "build:prod": "node -r esm prod-build.js", "publish-packages": "node -r esm publish.js", "install-new-dependencies": "node -r esm install-new-dependencies.js", "sync": "node -r esm sync.js", diff --git a/npm/ng-packs/scripts/prod-build.js b/npm/ng-packs/scripts/prod-build.js new file mode 100644 index 0000000000..2f204b11d7 --- /dev/null +++ b/npm/ng-packs/scripts/prod-build.js @@ -0,0 +1,21 @@ +// ESM syntax is supported. +import execa from 'execa'; +import fse from 'fs-extra'; + +(async () => { + await execa('yarn', ['install', '--ignore-scripts'], { + stdout: 'inherit', + cwd: '../../../templates/app/angular', + }); + + await fse.remove('../../../templates/app/angular/node_modules/@abp'); + + await fse.copy('../node_modules/@abp', '../../../templates/app/angular/node_modules/@abp', { + overwrite: true, + }); + + await execa('yarn', ['ng', 'build', '--prod'], { + stdout: 'inherit', + cwd: '../../../templates/app/angular', + }); +})();