diff --git a/angular.json b/angular.json index 3c25ee4..2b5703f 100644 --- a/angular.json +++ b/angular.json @@ -338,6 +338,51 @@ } } } + }, + "ngx-ssr-platform": { + "projectType": "library", + "root": "libs/ngx-ssr/platform", + "sourceRoot": "libs/ngx-ssr/platform/src", + "prefix": "ngx-ssr", + "architect": { + "build": { + "builder": "@nrwl/angular:package", + "options": { + "tsConfig": "libs/ngx-ssr/platform/tsconfig.lib.json", + "project": "libs/ngx-ssr/platform/ng-package.json" + }, + "configurations": { + "production": { + "tsConfig": "libs/ngx-ssr/platform/tsconfig.lib.prod.json" + } + } + }, + "lint": { + "builder": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": [ + "libs/ngx-ssr/platform/src/**/*.ts", + "libs/ngx-ssr/platform/src/**/*.html" + ] + } + }, + "test": { + "builder": "@nrwl/jest:jest", + "outputs": ["coverage/libs/ngx-ssr/platform"], + "options": { + "jestConfig": "libs/ngx-ssr/platform/jest.config.js", + "passWithNoTests": true + } + }, + "deploy": { + "builder": "@ng-builders/semrel:release", + "options": { + "npm": { + "pkgRoot": "dist/libs/ngx-ssr/platform" + } + } + } + } } }, "cli": { diff --git a/jest.config.js b/jest.config.js index b448bd0..5c25355 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,5 +5,6 @@ module.exports = { '/libs/rickandmorty/api', '/libs/rickandmorty/utils', '/libs/ngx-ssr/timeout', + '/libs/ngx-ssr/platform', ], }; diff --git a/libs/ngx-ssr/platform/.eslintrc.json b/libs/ngx-ssr/platform/.eslintrc.json new file mode 100644 index 0000000..5239f03 --- /dev/null +++ b/libs/ngx-ssr/platform/.eslintrc.json @@ -0,0 +1,31 @@ +{ + "extends": ["../../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts"], + "extends": [ + "plugin:@nrwl/nx/angular", + "plugin:@angular-eslint/template/process-inline-templates" + ], + "parserOptions": { + "project": ["libs/ngx-ssr/platform/tsconfig.*?.json"] + }, + "rules": { + "@angular-eslint/directive-selector": [ + "error", + { "type": "attribute", "prefix": "ngxSsr", "style": "camelCase" } + ], + "@angular-eslint/component-selector": [ + "error", + { "type": "element", "prefix": "ngx-ssr", "style": "kebab-case" } + ] + } + }, + { + "files": ["*.html"], + "extends": ["plugin:@nrwl/nx/angular-template"], + "rules": {} + } + ] +} diff --git a/libs/ngx-ssr/platform/README.md b/libs/ngx-ssr/platform/README.md new file mode 100644 index 0000000..5e9e3d8 --- /dev/null +++ b/libs/ngx-ssr/platform/README.md @@ -0,0 +1 @@ +# @ngx-ssr/platform diff --git a/libs/ngx-ssr/platform/jest.config.js b/libs/ngx-ssr/platform/jest.config.js new file mode 100644 index 0000000..8efca77 --- /dev/null +++ b/libs/ngx-ssr/platform/jest.config.js @@ -0,0 +1,23 @@ +module.exports = { + displayName: 'ngx-ssr-platform', + preset: '../../../jest.preset.js', + setupFilesAfterEnv: ['/src/test-setup.ts'], + globals: { + 'ts-jest': { + tsConfig: '/tsconfig.spec.json', + stringifyContentPathRegex: '\\.(html|svg)$', + astTransformers: { + before: [ + 'jest-preset-angular/build/InlineFilesTransformer', + 'jest-preset-angular/build/StripStylesTransformer', + ], + }, + }, + }, + coverageDirectory: '../../../coverage/libs/ngx-ssr/platform', + snapshotSerializers: [ + 'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js', + 'jest-preset-angular/build/AngularSnapshotSerializer.js', + 'jest-preset-angular/build/HTMLCommentSerializer.js', + ], +}; diff --git a/libs/ngx-ssr/platform/ng-package.json b/libs/ngx-ssr/platform/ng-package.json new file mode 100644 index 0000000..b628786 --- /dev/null +++ b/libs/ngx-ssr/platform/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../../dist/libs/ngx-ssr/platform", + "lib": { + "entryFile": "src/index.ts" + } +} diff --git a/libs/ngx-ssr/platform/package.json b/libs/ngx-ssr/platform/package.json new file mode 100644 index 0000000..57e7619 --- /dev/null +++ b/libs/ngx-ssr/platform/package.json @@ -0,0 +1,24 @@ +{ + "name": "@ngx-ssr/platform", + "version": "0.0.0-development", + "keywords": [ + "angular", + "angulae ssr", + "universal", + "angular/universal", + "ssr", + "platform", + "is-server", + "is-browser" + ], + "peerDependencies": { + "@angular/common": "^11.0.6", + "@angular/core": "^11.0.6" + }, + "dependencies": { + "tslib": "^2.0.0" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/libs/ngx-ssr/platform/src/index.ts b/libs/ngx-ssr/platform/src/index.ts new file mode 100644 index 0000000..795553a --- /dev/null +++ b/libs/ngx-ssr/platform/src/index.ts @@ -0,0 +1,4 @@ +export * from './lib/is-server.directive'; +export * from './lib/is-browser.directive'; +export * from './lib/ngx-ssr-platform.module'; +export * from './lib/tokens'; diff --git a/libs/ngx-ssr/platform/src/lib/is-browser.directive.spec.ts b/libs/ngx-ssr/platform/src/lib/is-browser.directive.spec.ts new file mode 100644 index 0000000..21ae5df --- /dev/null +++ b/libs/ngx-ssr/platform/src/lib/is-browser.directive.spec.ts @@ -0,0 +1,35 @@ +import { IsBrowserDirective } from './is-browser.directive'; +import { render, screen } from '@testing-library/angular'; +import { IS_BROWSER_PLATFORM } from './tokens'; + +describe('IsBrowserDirective', () => { + it('should create an element', async () => { + await render(IsBrowserDirective, { + template: '
Some text
', + providers: [ + { + provide: IS_BROWSER_PLATFORM, + useValue: true, + }, + ], + }); + + expect(screen.getByText('Some text').outerHTML).toStrictEqual( + '
Some text
' + ); + }); + + it('should not create an element', async () => { + await render(IsBrowserDirective, { + template: '
Some text
', + providers: [ + { + provide: IS_BROWSER_PLATFORM, + useValue: false, + }, + ], + }); + + expect(() => screen.getByText('Some text')).toThrowError(); + }); +}); diff --git a/libs/ngx-ssr/platform/src/lib/is-browser.directive.ts b/libs/ngx-ssr/platform/src/lib/is-browser.directive.ts new file mode 100644 index 0000000..c87c016 --- /dev/null +++ b/libs/ngx-ssr/platform/src/lib/is-browser.directive.ts @@ -0,0 +1,23 @@ +import { + Directive, + Inject, + TemplateRef, + ViewContainerRef, +} from '@angular/core'; +import { IS_BROWSER_PLATFORM } from './tokens'; + +@Directive({ + // eslint-disable-next-line @angular-eslint/directive-selector + selector: '[isBrowser]', +}) +export class IsBrowserDirective { + constructor( + @Inject(IS_BROWSER_PLATFORM) isBrowser: boolean, + templateRef: TemplateRef, + viewContainer: ViewContainerRef + ) { + if (isBrowser) { + viewContainer.createEmbeddedView(templateRef); + } + } +} diff --git a/libs/ngx-ssr/platform/src/lib/is-server.directive.spec.ts b/libs/ngx-ssr/platform/src/lib/is-server.directive.spec.ts new file mode 100644 index 0000000..17c1f25 --- /dev/null +++ b/libs/ngx-ssr/platform/src/lib/is-server.directive.spec.ts @@ -0,0 +1,35 @@ +import { IsServerDirective } from './is-server.directive'; +import { render, screen } from '@testing-library/angular'; +import { IS_SERVER_PLATFORM } from './tokens'; + +describe('IsServerDirective', () => { + it('should create an element', async () => { + await render(IsServerDirective, { + template: '
Some text
', + providers: [ + { + provide: IS_SERVER_PLATFORM, + useValue: true, + }, + ], + }); + + expect(screen.getByText('Some text').outerHTML).toStrictEqual( + '
Some text
' + ); + }); + + it('should not create an element', async () => { + await render(IsServerDirective, { + template: '
Some text
', + providers: [ + { + provide: IS_SERVER_PLATFORM, + useValue: false, + }, + ], + }); + + expect(() => screen.getByText('Some text')).toThrowError(); + }); +}); diff --git a/libs/ngx-ssr/platform/src/lib/is-server.directive.ts b/libs/ngx-ssr/platform/src/lib/is-server.directive.ts new file mode 100644 index 0000000..f438f38 --- /dev/null +++ b/libs/ngx-ssr/platform/src/lib/is-server.directive.ts @@ -0,0 +1,23 @@ +import { + Directive, + Inject, + TemplateRef, + ViewContainerRef, +} from '@angular/core'; +import { IS_SERVER_PLATFORM } from './tokens'; + +@Directive({ + // eslint-disable-next-line @angular-eslint/directive-selector + selector: '[isServer]', +}) +export class IsServerDirective { + constructor( + @Inject(IS_SERVER_PLATFORM) isServer: boolean, + templateRef: TemplateRef, + viewContainer: ViewContainerRef + ) { + if (isServer) { + viewContainer.createEmbeddedView(templateRef); + } + } +} diff --git a/libs/ngx-ssr/platform/src/lib/ngx-ssr-platform.module.ts b/libs/ngx-ssr/platform/src/lib/ngx-ssr-platform.module.ts new file mode 100644 index 0000000..b1b6cd8 --- /dev/null +++ b/libs/ngx-ssr/platform/src/lib/ngx-ssr-platform.module.ts @@ -0,0 +1,11 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { IsBrowserDirective } from './is-browser.directive'; +import { IsServerDirective } from './is-server.directive'; + +@NgModule({ + imports: [CommonModule], + declarations: [IsBrowserDirective, IsServerDirective], + exports: [IsBrowserDirective, IsServerDirective], +}) +export class NgxSsrPlatformModule {} diff --git a/libs/ngx-ssr/platform/src/lib/tokens.ts b/libs/ngx-ssr/platform/src/lib/tokens.ts new file mode 100644 index 0000000..2d12840 --- /dev/null +++ b/libs/ngx-ssr/platform/src/lib/tokens.ts @@ -0,0 +1,18 @@ +import { inject, InjectionToken, PLATFORM_ID } from '@angular/core'; +import { isPlatformBrowser, isPlatformServer } from '@angular/common'; + +export const IS_SERVER_PLATFORM = new InjectionToken('Is server?', { + factory() { + const platform = inject(PLATFORM_ID); + + return isPlatformServer(platform); + }, +}); + +export const IS_BROWSER_PLATFORM = new InjectionToken('Is browser?', { + factory() { + const platform = inject(PLATFORM_ID); + + return isPlatformBrowser(platform); + }, +}); diff --git a/libs/ngx-ssr/platform/src/test-setup.ts b/libs/ngx-ssr/platform/src/test-setup.ts new file mode 100644 index 0000000..8d88704 --- /dev/null +++ b/libs/ngx-ssr/platform/src/test-setup.ts @@ -0,0 +1 @@ +import 'jest-preset-angular'; diff --git a/libs/ngx-ssr/platform/tsconfig.json b/libs/ngx-ssr/platform/tsconfig.json new file mode 100644 index 0000000..c639812 --- /dev/null +++ b/libs/ngx-ssr/platform/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.lib.prod.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/libs/ngx-ssr/platform/tsconfig.lib.json b/libs/ngx-ssr/platform/tsconfig.lib.json new file mode 100644 index 0000000..890aaeb --- /dev/null +++ b/libs/ngx-ssr/platform/tsconfig.lib.json @@ -0,0 +1,19 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "target": "es2015", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [], + "lib": ["dom", "es2018"] + }, + "angularCompilerOptions": { + "skipTemplateCodegen": true, + "strictMetadataEmit": true, + "enableResourceInlining": true + }, + "exclude": ["src/test-setup.ts", "**/*.spec.ts"], + "include": ["**/*.ts"] +} diff --git a/libs/ngx-ssr/platform/tsconfig.lib.prod.json b/libs/ngx-ssr/platform/tsconfig.lib.prod.json new file mode 100644 index 0000000..5615c27 --- /dev/null +++ b/libs/ngx-ssr/platform/tsconfig.lib.prod.json @@ -0,0 +1,10 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, + "angularCompilerOptions": { + "enableIvy": false + } +} diff --git a/libs/ngx-ssr/platform/tsconfig.spec.json b/libs/ngx-ssr/platform/tsconfig.spec.json new file mode 100644 index 0000000..fd405a6 --- /dev/null +++ b/libs/ngx-ssr/platform/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/nx.json b/nx.json index fdfb27c..e5c23d5 100644 --- a/nx.json +++ b/nx.json @@ -1,9 +1,14 @@ { "npmScope": "ngx-ssr", - "affected": { "defaultBase": "master" }, + "affected": { + "defaultBase": "master" + }, "implicitDependencies": { "angular.json": "*", - "package.json": { "dependencies": "*", "devDependencies": "*" }, + "package.json": { + "dependencies": "*", + "devDependencies": "*" + }, "tsconfig.base.json": "*", "tslint.json": "*", ".eslintrc.json": "*", @@ -14,7 +19,12 @@ "runner": "@nrwl/nx-cloud", "options": { "accessToken": "NDc0Nzc2NTgtNjExYy00YzYwLWIzY2QtYmQyOGRlNWMwY2IzfHJlYWQtd3JpdGU=", - "cacheableOperations": ["build", "test", "lint", "e2e"], + "cacheableOperations": [ + "build", + "test", + "lint", + "e2e" + ], "canTrackAnalytics": false, "showUsageWarnings": true, "scan": true @@ -22,14 +32,29 @@ } }, "projects": { - "rickandmorty": { "tags": [] }, + "rickandmorty": { + "tags": [] + }, "rickandmorty-e2e": { "tags": [], - "implicitDependencies": ["rickandmorty"] + "implicitDependencies": [ + "rickandmorty" + ] + }, + "ngx-ssr-cache": { + "tags": [] }, - "ngx-ssr-cache": { "tags": [] }, - "rickandmorty-api": { "tags": [] }, - "rickandmorty-utils": { "tags": [] }, - "ngx-ssr-timeout": { "tags": [] } + "rickandmorty-api": { + "tags": [] + }, + "rickandmorty-utils": { + "tags": [] + }, + "ngx-ssr-timeout": { + "tags": [] + }, + "ngx-ssr-platform": { + "tags": [] + } } } diff --git a/package-lock.json b/package-lock.json index b349fec..f58cdb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3837,6 +3837,15 @@ "@opentelemetry/semantic-conventions": "^0.12.0" } }, + "@phenomnomnominal/tsquery": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@phenomnomnominal/tsquery/-/tsquery-4.1.1.tgz", + "integrity": "sha512-jjMmK1tnZbm1Jq5a7fBliM4gQwjxMU7TFoRNwIyzwlO+eHPRCFv/Nv+H/Gi1jc3WR7QURG8D5d0Tn12YGrUqBQ==", + "dev": true, + "requires": { + "esquery": "^1.0.1" + } + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -4445,6 +4454,115 @@ } } }, + "@testing-library/angular": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/@testing-library/angular/-/angular-10.3.1.tgz", + "integrity": "sha512-ZIyxgyWEfuvFLDlu1FVoWqH5bSCk7m0XU78KE7M4XAW9LE8mGCpeTEIstLW/t8Y8oK83JWy81mpyDFkRJsjWmw==", + "dev": true, + "requires": { + "@phenomnomnominal/tsquery": "^4.1.1", + "@testing-library/dom": "^7.18.1", + "tslib": "^2.0.0", + "tslint": "^5.16.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "tslint": { + "version": "5.20.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", + "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.29.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + } + } + }, + "@testing-library/dom": { + "version": "7.29.4", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.29.4.tgz", + "integrity": "sha512-CtrJRiSYEfbtNGtEsd78mk1n1v2TUbeABlNIcOCJdDfkN5/JTOwQEbbQpoSRxGqzcWPgStMvJ4mNolSuBRv1NA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^4.2.0", + "aria-query": "^4.2.2", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.4", + "lz-string": "^1.4.4", + "pretty-format": "^26.6.2" + } + }, "@tinkoff/ng-event-plugins": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tinkoff/ng-event-plugins/-/ng-event-plugins-2.0.0.tgz", @@ -4481,6 +4599,12 @@ "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true }, + "@types/aria-query": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.1.tgz", + "integrity": "sha512-S6oPal772qJZHoRZLFc/XoZW2gFvwXusYUmXPXkgxJLuEk2vOt7jc4Yo6z/vtI0EBkbPBVrJJ0B+prLIKiWqHg==", + "dev": true + }, "@types/babel__core": { "version": "7.1.12", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz", @@ -9441,6 +9565,12 @@ "esutils": "^2.0.2" } }, + "dom-accessibility-api": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.4.tgz", + "integrity": "sha512-TvrjBckDy2c6v6RLxPv5QXOnU+SmF9nBII5621Ve5fu6Z/BDrENurBEvlC1f44lKEUVqOpK4w9E5Idc5/EgkLQ==", + "dev": true + }, "dom-serializer": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", @@ -15677,6 +15807,12 @@ "es5-ext": "~0.10.2" } }, + "lz-string": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", + "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=", + "dev": true + }, "magic-string": { "version": "0.25.7", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", diff --git a/package.json b/package.json index b254aec..36b2c34 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "@nrwl/nx-cloud": "11.0.1", "@nrwl/tao": "11.1.2", "@nrwl/workspace": "11.1.2", + "@testing-library/angular": "^10.3.1", "@types/jest": "26.0.20", "@types/node": "12.12.38", "@typescript-eslint/eslint-plugin": "4.13.0", diff --git a/tsconfig.base.json b/tsconfig.base.json index 85e7973..b220f1b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -18,7 +18,8 @@ "@ngx-ssr/cache": ["libs/ngx-ssr/cache/src/index.ts"], "ngx-rickandmorty": ["libs/rickandmorty/api/src/index.ts"], "@ngx-ssr/rickandmorty/utils": ["libs/rickandmorty/utils/src/index.ts"], - "@ngx-ssr/timeout": ["libs/ngx-ssr/timeout/src/index.ts"] + "@ngx-ssr/timeout": ["libs/ngx-ssr/timeout/src/index.ts"], + "@ngx-ssr/platform": ["libs/ngx-ssr/platform/src/index.ts"] } }, "exclude": ["node_modules", "tmp"]