diff --git a/.env-sample b/.env-sample index 5b2fde95..a59c31a4 100644 --- a/.env-sample +++ b/.env-sample @@ -18,6 +18,8 @@ GITLAB_CLIENT_ID= GITLAB_CLIENT_SECRET= GITLAB_REDIRECT_URI= +GOOGLE_ANALYTICS_ID= + #DB_HOST=db for production DB_HOST=localhost DB_NAME=pmp diff --git a/angular.json b/angular.json index 64c1a0d6..c7a34fbf 100644 --- a/angular.json +++ b/angular.json @@ -2127,6 +2127,70 @@ "styleext": "scss" } } + }, + "pmp-web-shared-util-google-analytics": { + "projectType": "library", + "root": "libs/pmp-web/shared/util-google-analytics", + "sourceRoot": "libs/pmp-web/shared/util-google-analytics/src", + "prefix": "pimp-my-pr", + "architect": { + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "libs/pmp-web/shared/util-google-analytics/tsconfig.lib.json", + "libs/pmp-web/shared/util-google-analytics/tsconfig.spec.json" + ], + "exclude": ["**/node_modules/**", "!libs/pmp-web/shared/util-google-analytics/**"] + } + }, + "test": { + "builder": "@nrwl/jest:jest", + "options": { + "jestConfig": "libs/pmp-web/shared/util-google-analytics/jest.config.js", + "tsConfig": "libs/pmp-web/shared/util-google-analytics/tsconfig.spec.json", + "passWithNoTests": true, + "setupFile": "libs/pmp-web/shared/util-google-analytics/src/test-setup.ts" + } + } + }, + "schematics": { + "@nrwl/angular:component": { + "style": "scss" + } + } + }, + "pmp-web-shell": { + "projectType": "library", + "root": "libs/pmp-web/shell", + "sourceRoot": "libs/pmp-web/shell/src", + "prefix": "pimp-my-pr", + "architect": { + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "libs/pmp-web/shell/tsconfig.lib.json", + "libs/pmp-web/shell/tsconfig.spec.json" + ], + "exclude": ["**/node_modules/**", "!libs/pmp-web/shell/**"] + } + }, + "test": { + "builder": "@nrwl/jest:jest", + "options": { + "jestConfig": "libs/pmp-web/shell/jest.config.js", + "tsConfig": "libs/pmp-web/shell/tsconfig.spec.json", + "passWithNoTests": true, + "setupFile": "libs/pmp-web/shell/src/test-setup.ts" + } + } + }, + "schematics": { + "@nrwl/angular:component": { + "style": "scss" + } + } } }, "cli": { diff --git a/apps/pmp-web/docker/entrypoint.sh b/apps/pmp-web/docker/entrypoint.sh index fbbc3aba..35fca659 100755 --- a/apps/pmp-web/docker/entrypoint.sh +++ b/apps/pmp-web/docker/entrypoint.sh @@ -4,6 +4,7 @@ GITHUB_CLIENT_ID="${GITHUB_CLIENT_ID}" BITBUCKET_CLIENT_ID="${BITBUCKET_CLIENT_ID}" GITLAB_CLIENT_ID="${GITLAB_CLIENT_ID}" GITLAB_REDIRECT_URI="${GITLAB_REDIRECT_URI}" +GOOGLE_ANALYTICS_ID="${GOOGLE_ANALYTICS_ID}" for f in /usr/share/nginx/html/assets/env/*.sample; do cp -- "$f" "${f%.sample}" @@ -11,6 +12,7 @@ for f in /usr/share/nginx/html/assets/env/*.sample; do sed -i -- "s/{{bitbucketClientId}}/${BITBUCKET_CLIENT_ID}/g" "${f%.sample}" sed -i -- "s/{{gitlabClientId}}/${GITLAB_CLIENT_ID}/g" "${f%.sample}" sed -i -- "s/{{gitlabRedirectUri}}/${GITLAB_REDIRECT_URI}/g" "${f%.sample}" + sed -i -- "s/{{googleAnalyticsId}}/${GOOGLE_ANALYTICS_ID}/g" "${f%.sample}" echo "${f%.sample}" done diff --git a/apps/pmp-web/src/app/app.module.ts b/apps/pmp-web/src/app/app.module.ts index d445cd20..059bc0d6 100644 --- a/apps/pmp-web/src/app/app.module.ts +++ b/apps/pmp-web/src/app/app.module.ts @@ -5,6 +5,7 @@ import { PmpWebRepositoryShellModule } from '@pimp-my-pr/pmp-web/repository/shel import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; +import { PmpWebShellModule } from '@pimp-my-pr/pmp-web/shell'; @NgModule({ declarations: [AppComponent], @@ -12,7 +13,8 @@ import { AppComponent } from './app.component'; AppRoutingModule, PmpWebSharedCoreModule, PmpWebRepositoryShellModule, - PmpWebAuthShellModule + PmpWebAuthShellModule, + PmpWebShellModule ], bootstrap: [AppComponent] }) diff --git a/apps/pmp-web/src/assets/env/env.json.sample b/apps/pmp-web/src/assets/env/env.json.sample index 53daccac..ad528f71 100644 --- a/apps/pmp-web/src/assets/env/env.json.sample +++ b/apps/pmp-web/src/assets/env/env.json.sample @@ -2,5 +2,6 @@ "bitbucketClientId": "{{bitbucketClientId}}", "githubClientId": "{{githubClientId}}", "gitlabClientId": "{{gitlabClientId}}", - "gitlabRedirectUri": "{{gitlabRedirectUri}}" + "gitlabRedirectUri": "{{gitlabRedirectUri}}", + "googleAnalyticsId": "{{googleAnalyticsId}}" } diff --git a/apps/pmp-web/src/assets/scripts/google-analytics-script.js b/apps/pmp-web/src/assets/scripts/google-analytics-script.js new file mode 100644 index 00000000..6400c870 --- /dev/null +++ b/apps/pmp-web/src/assets/scripts/google-analytics-script.js @@ -0,0 +1,5 @@ +window.dataLayer = window.dataLayer || []; +function gtag() { + dataLayer.push(arguments); +} +gtag('js', new Date()); diff --git a/docker-compose.yml b/docker-compose.yml index a068c7f0..5cb63e21 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,7 @@ services: - GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID} - GITLAB_CLIENT_ID=${GITLAB_CLIENT_ID} - GITLAB_REDIRECT_URI=${GITLAB_REDIRECT_URI} + - GOOGLE_ANALYTICS_ID=${GOOGLE_ANALYTICS_ID} networks: - default api: diff --git a/libs/pmp-web/shared/config/src/lib/environment/environment.interface.ts b/libs/pmp-web/shared/config/src/lib/environment/environment.interface.ts index 9f471215..db401b1f 100644 --- a/libs/pmp-web/shared/config/src/lib/environment/environment.interface.ts +++ b/libs/pmp-web/shared/config/src/lib/environment/environment.interface.ts @@ -3,5 +3,6 @@ export class Environment { githubClientId: string; gitlabClientId: string; gitlabRedirectUri: string; + googleAnalyticsId: string; production: boolean; } diff --git a/libs/pmp-web/shared/util-google-analytics/README.md b/libs/pmp-web/shared/util-google-analytics/README.md new file mode 100644 index 00000000..fc133654 --- /dev/null +++ b/libs/pmp-web/shared/util-google-analytics/README.md @@ -0,0 +1,7 @@ +# pmp-web-shared-util-google-analytics + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test pmp-web-shared-util-google-analytics` to execute the unit tests. diff --git a/libs/pmp-web/shared/util-google-analytics/jest.config.js b/libs/pmp-web/shared/util-google-analytics/jest.config.js new file mode 100644 index 00000000..62430c8b --- /dev/null +++ b/libs/pmp-web/shared/util-google-analytics/jest.config.js @@ -0,0 +1,10 @@ +module.exports = { + name: 'pmp-web-shared-util-google-analytics', + preset: '../../../../jest.config.js', + coverageDirectory: '../../../../coverage/libs/pmp-web/shared/util-google-analytics', + snapshotSerializers: [ + 'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js', + 'jest-preset-angular/build/AngularSnapshotSerializer.js', + 'jest-preset-angular/build/HTMLCommentSerializer.js' + ] +}; diff --git a/libs/pmp-web/shared/util-google-analytics/src/index.ts b/libs/pmp-web/shared/util-google-analytics/src/index.ts new file mode 100644 index 00000000..382793d0 --- /dev/null +++ b/libs/pmp-web/shared/util-google-analytics/src/index.ts @@ -0,0 +1,2 @@ +export * from './lib/pmp-web-shared-util-google-analytics.module'; +export * from './lib/google-analytics.service'; diff --git a/libs/pmp-web/shared/util-google-analytics/src/lib/google-analytics.service.spec.ts b/libs/pmp-web/shared/util-google-analytics/src/lib/google-analytics.service.spec.ts new file mode 100644 index 00000000..8e90c33d --- /dev/null +++ b/libs/pmp-web/shared/util-google-analytics/src/lib/google-analytics.service.spec.ts @@ -0,0 +1,20 @@ +import { TestBed } from '@angular/core/testing'; + +import { GoogleAnalyticsService } from './google-analytics.service'; +import { RouterTestingModule } from '@angular/router/testing'; + +describe('GoogleAnalyticsService', () => { + let service: GoogleAnalyticsService; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [RouterTestingModule], + providers: [GoogleAnalyticsService] + }); + service = TestBed.inject(GoogleAnalyticsService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/libs/pmp-web/shared/util-google-analytics/src/lib/google-analytics.service.ts b/libs/pmp-web/shared/util-google-analytics/src/lib/google-analytics.service.ts new file mode 100644 index 00000000..6f5e1079 --- /dev/null +++ b/libs/pmp-web/shared/util-google-analytics/src/lib/google-analytics.service.ts @@ -0,0 +1,74 @@ +import { Inject, Injectable, Renderer2, RendererFactory2 } from '@angular/core'; +import { DOCUMENT } from '@angular/common'; +import { NavigationEnd, Router, RouterEvent } from '@angular/router'; +import { environment } from '@pimp-my-pr/pmp-web/shared/config'; +import { Observable } from 'rxjs'; +import { filter, share, tap } from 'rxjs/operators'; + +declare let gtag: Function; + +@Injectable() +export class GoogleAnalyticsService { + private readonly renderer: Renderer2; + private readonly googleId: string; + private loaded = false; + private loadingInProgress = false; + + constructor( + private rendererFactory: RendererFactory2, + @Inject(DOCUMENT) private document: Document, + private router: Router + ) { + this.renderer = rendererFactory.createRenderer(null, null); + this.googleId = environment.googleAnalyticsId; + } + + async init(): Promise { + if (this.loaded || this.loadingInProgress) return; + try { + await this.insertGoogleScript(this.googleId); + await this.insertLocalScript(); + this.loaded = true; + } catch (error) { + console.error(error); + } finally { + this.loadingInProgress = false; + } + } + + trackPageViews(): Observable { + return this.router.events.pipe( + filter(() => this.loaded), + filter((evt: RouterEvent) => evt instanceof NavigationEnd), + tap((event: NavigationEnd) => { + this.trackSinglePageView(event); + }), + share() + ); + } + + private trackSinglePageView(event: NavigationEnd): void { + gtag('config', this.googleId, { page_path: event.urlAfterRedirects }); + } + + private async insertGoogleScript(googleId: string): Promise { + if (!googleId) throw new Error('googleId not set'); + await this.insertScript(`https://www.googletagmanager.com/gtag/js?id=${googleId}`); + } + + private async insertLocalScript(): Promise { + await this.insertScript('/assets/scripts/google-analytics-script.js'); + } + + private insertScript(path: string): Promise { + return new Promise((resolve, reject) => { + const script = this.renderer.createElement('script') as HTMLScriptElement; + script.type = 'text/javascript'; + script.onload = () => resolve(); + script.onerror = () => reject(); + script.src = path; + script.text = path; + this.renderer.appendChild(this.document.body, script); + }); + } +} diff --git a/libs/pmp-web/shared/util-google-analytics/src/lib/pmp-web-shared-util-google-analytics.module.ts b/libs/pmp-web/shared/util-google-analytics/src/lib/pmp-web-shared-util-google-analytics.module.ts new file mode 100644 index 00000000..0e7a5e85 --- /dev/null +++ b/libs/pmp-web/shared/util-google-analytics/src/lib/pmp-web-shared-util-google-analytics.module.ts @@ -0,0 +1,9 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { GoogleAnalyticsService } from './google-analytics.service'; + +@NgModule({ + imports: [CommonModule], + providers: [GoogleAnalyticsService] +}) +export class PmpWebSharedUtilGoogleAnalyticsModule {} diff --git a/libs/pmp-web/shared/util-google-analytics/src/test-setup.ts b/libs/pmp-web/shared/util-google-analytics/src/test-setup.ts new file mode 100644 index 00000000..8d88704e --- /dev/null +++ b/libs/pmp-web/shared/util-google-analytics/src/test-setup.ts @@ -0,0 +1 @@ +import 'jest-preset-angular'; diff --git a/libs/pmp-web/shared/util-google-analytics/tsconfig.json b/libs/pmp-web/shared/util-google-analytics/tsconfig.json new file mode 100644 index 00000000..a6233e13 --- /dev/null +++ b/libs/pmp-web/shared/util-google-analytics/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../../tsconfig.json", + "compilerOptions": { + "types": ["node", "jest"] + }, + "include": ["**/*.ts"] +} diff --git a/libs/pmp-web/shared/util-google-analytics/tsconfig.lib.json b/libs/pmp-web/shared/util-google-analytics/tsconfig.lib.json new file mode 100644 index 00000000..290e7bc9 --- /dev/null +++ b/libs/pmp-web/shared/util-google-analytics/tsconfig.lib.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../../dist/out-tsc", + "target": "es2015", + "declaration": true, + "inlineSources": true, + "types": [], + "lib": ["dom", "es2018"] + }, + "angularCompilerOptions": { + "skipTemplateCodegen": true, + "strictMetadataEmit": true, + "enableResourceInlining": true + }, + "exclude": ["src/test-setup.ts", "**/*.spec.ts"] +} diff --git a/libs/pmp-web/shared/util-google-analytics/tsconfig.spec.json b/libs/pmp-web/shared/util-google-analytics/tsconfig.spec.json new file mode 100644 index 00000000..aed68bc6 --- /dev/null +++ b/libs/pmp-web/shared/util-google-analytics/tsconfig.spec.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "files": ["src/test-setup.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] +} diff --git a/libs/pmp-web/shared/util-google-analytics/tslint.json b/libs/pmp-web/shared/util-google-analytics/tslint.json new file mode 100644 index 00000000..b12cab6f --- /dev/null +++ b/libs/pmp-web/shared/util-google-analytics/tslint.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../../tslint.json", + "rules": { + "directive-selector": [true, "attribute", "pimpMyPr", "camelCase"], + "component-selector": [true, "element", "pimp-my-pr", "kebab-case"] + }, + "linterOptions": { + "exclude": ["!**/*"] + } +} diff --git a/libs/pmp-web/shell/README.md b/libs/pmp-web/shell/README.md new file mode 100644 index 00000000..fc133654 --- /dev/null +++ b/libs/pmp-web/shell/README.md @@ -0,0 +1,7 @@ +# pmp-web-shared-util-google-analytics + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test pmp-web-shared-util-google-analytics` to execute the unit tests. diff --git a/libs/pmp-web/shell/jest.config.js b/libs/pmp-web/shell/jest.config.js new file mode 100644 index 00000000..a20575dc --- /dev/null +++ b/libs/pmp-web/shell/jest.config.js @@ -0,0 +1,10 @@ +module.exports = { + name: 'pmp-web-shell', + preset: '../../../jest.config.js', + coverageDirectory: '../../../coverage/libs/pmp-web/shell', + snapshotSerializers: [ + 'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js', + 'jest-preset-angular/build/AngularSnapshotSerializer.js', + 'jest-preset-angular/build/HTMLCommentSerializer.js' + ] +}; diff --git a/libs/pmp-web/shell/src/index.ts b/libs/pmp-web/shell/src/index.ts new file mode 100644 index 00000000..5467abe0 --- /dev/null +++ b/libs/pmp-web/shell/src/index.ts @@ -0,0 +1 @@ +export * from './lib/pmp-web-shell.module'; diff --git a/libs/pmp-web/shell/src/lib/pmp-web-shell.module.ts b/libs/pmp-web/shell/src/lib/pmp-web-shell.module.ts new file mode 100644 index 00000000..ac7a46ce --- /dev/null +++ b/libs/pmp-web/shell/src/lib/pmp-web-shell.module.ts @@ -0,0 +1,18 @@ +import { APP_INITIALIZER, NgModule } from '@angular/core'; +import { + GoogleAnalyticsService, + PmpWebSharedUtilGoogleAnalyticsModule +} from '@pimp-my-pr/pmp-web/shared/util-google-analytics'; + +@NgModule({ + imports: [PmpWebSharedUtilGoogleAnalyticsModule], + providers: [ + { + provide: APP_INITIALIZER, + useFactory: (googleService: GoogleAnalyticsService) => () => googleService.init(), + deps: [GoogleAnalyticsService], + multi: true + } + ] +}) +export class PmpWebShellModule {} diff --git a/libs/pmp-web/shell/src/test-setup.ts b/libs/pmp-web/shell/src/test-setup.ts new file mode 100644 index 00000000..8d88704e --- /dev/null +++ b/libs/pmp-web/shell/src/test-setup.ts @@ -0,0 +1 @@ +import 'jest-preset-angular'; diff --git a/libs/pmp-web/shell/tsconfig.json b/libs/pmp-web/shell/tsconfig.json new file mode 100644 index 00000000..08c7db8c --- /dev/null +++ b/libs/pmp-web/shell/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "types": ["node", "jest"] + }, + "include": ["**/*.ts"] +} diff --git a/libs/pmp-web/shell/tsconfig.lib.json b/libs/pmp-web/shell/tsconfig.lib.json new file mode 100644 index 00000000..f0e13d43 --- /dev/null +++ b/libs/pmp-web/shell/tsconfig.lib.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "target": "es2015", + "declaration": true, + "inlineSources": true, + "types": [], + "lib": ["dom", "es2018"] + }, + "angularCompilerOptions": { + "skipTemplateCodegen": true, + "strictMetadataEmit": true, + "enableResourceInlining": true + }, + "exclude": ["src/test-setup.ts", "**/*.spec.ts"] +} diff --git a/libs/pmp-web/shell/tsconfig.spec.json b/libs/pmp-web/shell/tsconfig.spec.json new file mode 100644 index 00000000..fd405a65 --- /dev/null +++ b/libs/pmp-web/shell/tsconfig.spec.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "files": ["src/test-setup.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] +} diff --git a/libs/pmp-web/shell/tslint.json b/libs/pmp-web/shell/tslint.json new file mode 100644 index 00000000..33ad82cc --- /dev/null +++ b/libs/pmp-web/shell/tslint.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tslint.json", + "rules": { + "directive-selector": [true, "attribute", "pimpMyPr", "camelCase"], + "component-selector": [true, "element", "pimp-my-pr", "kebab-case"] + }, + "linterOptions": { + "exclude": ["!**/*"] + } +} diff --git a/nx.json b/nx.json index bb24445f..fc77bb76 100644 --- a/nx.json +++ b/nx.json @@ -217,6 +217,12 @@ }, "pmp-web-shared-styles": { "tags": ["scope:shared", "type:styles", "platform:web"] + }, + "pmp-web-shared-util-google-analytics": { + "tags": ["platform:web", "scope:shared", "type:util"] + }, + "pmp-web-shell": { + "tags": ["platform:web", "scope:pmp-web", "type:shell"] } }, "tasksRunnerOptions": { diff --git a/scripts/init.js b/scripts/init.js index 6bdf0da4..c038beb7 100644 --- a/scripts/init.js +++ b/scripts/init.js @@ -7,7 +7,8 @@ var _a = process.env, GITHUB_CLIENT_ID = _a.GITHUB_CLIENT_ID, BITBUCKET_CLIENT_ID = _a.BITBUCKET_CLIENT_ID, GITLAB_CLIENT_ID = _a.GITLAB_CLIENT_ID, - GITLAB_REDIRECT_URI = _a.GITLAB_REDIRECT_URI; + GITLAB_REDIRECT_URI = _a.GITLAB_REDIRECT_URI, + GOOGLE_ANALYTICS_ID = _a.GOOGLE_ANALYTICS_ID; function initPmpWebEnvironment() { var environmentFile = 'apps/pmp-web/src/assets/env/env.json'; fs.copyFileSync('apps/pmp-web/src/assets/env/env.json.sample', environmentFile); @@ -31,6 +32,11 @@ function initPmpWebEnvironment() { '' + (GITLAB_REDIRECT_URI ? '"' + GITLAB_REDIRECT_URI + '"' : null), [environmentFile] ); + replaceInFiles( + '"{{googleAnalyticsId}}"', + '' + (GOOGLE_ANALYTICS_ID ? '"' + GOOGLE_ANALYTICS_ID + '"' : null), + [environmentFile] + ); } function replaceInFiles(from, to, files) { for (var _i = 0, files_1 = files; _i < files_1.length; _i++) { diff --git a/scripts/init.ts b/scripts/init.ts index 1dca8c8a..5874ad9e 100644 --- a/scripts/init.ts +++ b/scripts/init.ts @@ -7,7 +7,8 @@ const { GITHUB_CLIENT_ID, BITBUCKET_CLIENT_ID, GITLAB_CLIENT_ID, - GITLAB_REDIRECT_URI + GITLAB_REDIRECT_URI, + GOOGLE_ANALYTICS_ID } = process.env; function initPmpWebEnvironment(): void { @@ -31,6 +32,12 @@ function initPmpWebEnvironment(): void { `${GITLAB_REDIRECT_URI ? `"${GITLAB_REDIRECT_URI}"` : null}`, [environmentFile] ); + + replaceInFiles( + `"{{googleAnalyticsId}}"`, + `${GOOGLE_ANALYTICS_ID ? `"${GOOGLE_ANALYTICS_ID}"` : null}`, + [environmentFile] + ); } function replaceInFiles(from: string, to: string, files: string[]): void { diff --git a/tsconfig.json b/tsconfig.json index e0bf2aff..d0e2a6ce 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -149,7 +149,10 @@ "@pimp-my-pr/server/auth/infrastructure-remote-token-crypto": [ "libs/server/auth/infrastructure-remote-token-crypto/src/index.ts" ], - "@pimp-my-pr/pmp-web/shared/styles": ["libs/pmp-web/shared/styles/src/index.ts"] + "@pimp-my-pr/pmp-web/shared/styles": ["libs/pmp-web/shared/styles/src/index.ts"], + "@pimp-my-pr/pmp-web/shared/util-google-analytics": [ + "libs/pmp-web/shared/util-google-analytics/src/index.ts" + ] } }, "exclude": ["node_modules", "tmp"] diff --git a/tslint.json b/tslint.json index a6261db6..5c6ac84b 100644 --- a/tslint.json +++ b/tslint.json @@ -77,6 +77,10 @@ "sourceTag": "scope:user", "onlyDependOnLibsWithTags": ["scope:user", "scope:shared"] }, + { + "sourceTag": "scope:pmp-web", + "onlyDependOnLibsWithTags": ["scope:pmp-web", "scope:shared"] + }, { "sourceTag": "type:public", "onlyDependOnLibsWithTags": ["*"]