From 69387537834939e443f135a160adcb5530fba757 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Wed, 17 Jun 2020 19:06:36 +0300 Subject: [PATCH] feat: delete legacy account config --- .../packages/account-config/README.md | 3 -- .../packages/account-config/jest.config.js | 6 --- .../packages/account-config/ng-package.json | 7 ---- .../packages/account-config/package.json | 12 ------ .../src/lib/account-config.module.ts | 37 ------------------- .../lib/services/account-config.service.ts | 22 ----------- .../packages/account-config/src/public-api.ts | 2 - .../packages/account-config/tsconfig.lib.json | 19 ---------- .../account-config/tsconfig.lib.prod.json | 6 --- .../account-config/tsconfig.spec.json | 11 ------ .../packages/account-config/tslint.json | 17 --------- 11 files changed, 142 deletions(-) delete mode 100644 npm/ng-packs/packages/account-config/README.md delete mode 100644 npm/ng-packs/packages/account-config/jest.config.js delete mode 100644 npm/ng-packs/packages/account-config/ng-package.json delete mode 100644 npm/ng-packs/packages/account-config/package.json delete mode 100644 npm/ng-packs/packages/account-config/src/lib/account-config.module.ts delete mode 100644 npm/ng-packs/packages/account-config/src/lib/services/account-config.service.ts delete mode 100644 npm/ng-packs/packages/account-config/src/public-api.ts delete mode 100644 npm/ng-packs/packages/account-config/tsconfig.lib.json delete mode 100644 npm/ng-packs/packages/account-config/tsconfig.lib.prod.json delete mode 100644 npm/ng-packs/packages/account-config/tsconfig.spec.json delete mode 100644 npm/ng-packs/packages/account-config/tslint.json diff --git a/npm/ng-packs/packages/account-config/README.md b/npm/ng-packs/packages/account-config/README.md deleted file mode 100644 index 8212588145..0000000000 --- a/npm/ng-packs/packages/account-config/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# @abp/ng.account.config - -[docs.abp.io](https://docs.abp.io) diff --git a/npm/ng-packs/packages/account-config/jest.config.js b/npm/ng-packs/packages/account-config/jest.config.js deleted file mode 100644 index 97cd0af1aa..0000000000 --- a/npm/ng-packs/packages/account-config/jest.config.js +++ /dev/null @@ -1,6 +0,0 @@ -const jestConfig = require('../../jest.config'); - -module.exports = { - ...jestConfig, - name: 'account-config', -}; diff --git a/npm/ng-packs/packages/account-config/ng-package.json b/npm/ng-packs/packages/account-config/ng-package.json deleted file mode 100644 index 75c8479ea8..0000000000 --- a/npm/ng-packs/packages/account-config/ng-package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", - "dest": "../../dist/account-config", - "lib": { - "entryFile": "src/public-api.ts" - } -} diff --git a/npm/ng-packs/packages/account-config/package.json b/npm/ng-packs/packages/account-config/package.json deleted file mode 100644 index 2b7882bcc2..0000000000 --- a/npm/ng-packs/packages/account-config/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "@abp/ng.account.config", - "version": "2.9.0", - "homepage": "https://abp.io", - "repository": { - "type": "git", - "url": "https://github.com/abpframework/abp.git" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/npm/ng-packs/packages/account-config/src/lib/account-config.module.ts b/npm/ng-packs/packages/account-config/src/lib/account-config.module.ts deleted file mode 100644 index 997bcbac81..0000000000 --- a/npm/ng-packs/packages/account-config/src/lib/account-config.module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { CoreModule, noop } from '@abp/ng.core'; -import { ThemeSharedModule } from '@abp/ng.theme.shared'; -import { APP_INITIALIZER, InjectionToken, ModuleWithProviders, NgModule } from '@angular/core'; -import { AccountConfigService } from './services/account-config.service'; - -export interface AccountConfigOptions { - redirectUrl?: string; -} - -export function accountOptionsFactory(options: AccountConfigOptions) { - return { - redirectUrl: '/', - ...options, - }; -} - -export const ACCOUNT_OPTIONS = new InjectionToken('ACCOUNT_OPTIONS'); - -@NgModule({ - imports: [CoreModule, ThemeSharedModule], - providers: [{ provide: APP_INITIALIZER, multi: true, deps: [AccountConfigService], useFactory: noop }], -}) -export class AccountConfigModule { - static forRoot(options = {} as AccountConfigOptions): ModuleWithProviders { - return { - ngModule: AccountConfigModule, - providers: [ - { provide: ACCOUNT_OPTIONS, useValue: options }, - { - provide: 'ACCOUNT_OPTIONS', - useFactory: accountOptionsFactory, - deps: [ACCOUNT_OPTIONS], - }, - ], - }; - } -} diff --git a/npm/ng-packs/packages/account-config/src/lib/services/account-config.service.ts b/npm/ng-packs/packages/account-config/src/lib/services/account-config.service.ts deleted file mode 100644 index d94935c071..0000000000 --- a/npm/ng-packs/packages/account-config/src/lib/services/account-config.service.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { addAbpRoutes, eLayoutType } from '@abp/ng.core'; -import { Injectable } from '@angular/core'; -import { eAccountRouteNames } from '@abp/ng.account'; - -@Injectable({ - providedIn: 'root', -}) -export class AccountConfigService { - constructor() { - addAbpRoutes({ - name: eAccountRouteNames.Account, - path: 'account', - invisible: true, - layout: eLayoutType.application, - children: [ - { path: 'login', name: eAccountRouteNames.Login, order: 1 }, - { path: 'register', name: eAccountRouteNames.Register, order: 2 }, - { path: 'manage-profile', name: eAccountRouteNames.ManageProfile, order: 3 }, - ], - }); - } -} diff --git a/npm/ng-packs/packages/account-config/src/public-api.ts b/npm/ng-packs/packages/account-config/src/public-api.ts deleted file mode 100644 index 83270614c0..0000000000 --- a/npm/ng-packs/packages/account-config/src/public-api.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './lib/services/account-config.service'; -export * from './lib/account-config.module'; diff --git a/npm/ng-packs/packages/account-config/tsconfig.lib.json b/npm/ng-packs/packages/account-config/tsconfig.lib.json deleted file mode 100644 index 4f48db2e46..0000000000 --- a/npm/ng-packs/packages/account-config/tsconfig.lib.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../tsconfig.prod.json", - "compilerOptions": { - "outDir": "../../out-tsc/lib", - "target": "es2015", - "declaration": true, - "inlineSources": true, - "types": [], - "lib": ["dom", "es2018"] - }, - "angularCompilerOptions": { - "skipTemplateCodegen": true, - "strictMetadataEmit": true, - "fullTemplateTypeCheck": true, - "strictInjectionParameters": true, - "enableResourceInlining": true - }, - "exclude": ["src/test.ts", "**/*.spec.ts"] -} diff --git a/npm/ng-packs/packages/account-config/tsconfig.lib.prod.json b/npm/ng-packs/packages/account-config/tsconfig.lib.prod.json deleted file mode 100644 index b1d501abbc..0000000000 --- a/npm/ng-packs/packages/account-config/tsconfig.lib.prod.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig.lib.json", - "angularCompilerOptions": { - "enableIvy": false - } -} \ No newline at end of file diff --git a/npm/ng-packs/packages/account-config/tsconfig.spec.json b/npm/ng-packs/packages/account-config/tsconfig.spec.json deleted file mode 100644 index 02f312c262..0000000000 --- a/npm/ng-packs/packages/account-config/tsconfig.spec.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../../tsconfig.prod.json", - "compilerOptions": { - "emitDecoratorMetadata": true, - "esModuleInterop": true, - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": ["**/*.spec.ts", "**/*.d.ts"] -} diff --git a/npm/ng-packs/packages/account-config/tslint.json b/npm/ng-packs/packages/account-config/tslint.json deleted file mode 100644 index 8c3919ea62..0000000000 --- a/npm/ng-packs/packages/account-config/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tslint.json", - "rules": { - "directive-selector": [ - true, - "attribute", - "abp", - "camelCase" - ], - "component-selector": [ - true, - "element", - "abp", - "kebab-case" - ] - } -}