Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/angular-inviewport",
"index": "src/index.html",
"main": "src/main.ts",
Expand All @@ -23,6 +24,12 @@
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
Expand All @@ -40,6 +47,12 @@
]
},
"no-progress": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"progress": false
}
}
Expand Down Expand Up @@ -129,7 +142,7 @@
"schematics": {
"@schematics/angular:component": {
"prefix": "sn",
"styleext": "scss"
"style": "scss"
},
"@schematics/angular:directive": {
"prefix": "sn"
Expand Down
2 changes: 1 addition & 1 deletion e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"baseUrl": "./",
Expand Down
98 changes: 48 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,62 +48,57 @@
"postrelease": "npm run packagr"
},
"private": false,
"peerDependencies": {
"@angular/core": ">=5.0.0 <9.0.0"
},
"peerDependencies": {},
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.0",
"@angular/animations": "8.2.14",
"@angular/cli": "8.3.24",
"@angular/common": "8.2.14",
"@angular/compiler": "8.2.14",
"@angular/compiler-cli": "8.2.14",
"@angular/core": "8.2.14",
"@angular/platform-browser": "8.2.14",
"@angular/platform-browser-dynamic": "8.2.14",
"@angular/platform-server": "8.2.14",
"@nguniversal/express-engine": "^8.2.6",
"@nguniversal/module-map-ngfactory-loader": "^8.2.6",
"@angular-devkit/build-angular": "~0.1000.4",
"@angular/animations": "10.0.5",
"@angular/cli": "10.0.4",
"@angular/common": "10.0.5",
"@angular/compiler": "10.0.5",
"@angular/compiler-cli": "10.0.5",
"@angular/core": "10.0.5",
"@angular/platform-browser": "10.0.5",
"@angular/platform-browser-dynamic": "10.0.5",
"@angular/platform-server": "10.0.5",
"@nguniversal/express-engine": "^10.0.1",
"@thisissoon/schematics": "^1.0.0-alpha.17",
"@types/jasmine": "~3.3.0",
"@types/jasmine": "^3.5.11",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~10.12.10",
"codelyzer": "^5.2.1",
"core-js": "^2.4.1",
"coveralls": "^3.0.0",
"cz-conventional-changelog": "^2.1.0",
"@types/node": "^14.0.25",
"codelyzer": "^6.0.0",
"core-js": "^3.6.5",
"coveralls": "^3.1.0",
"cz-conventional-changelog": "^3.2.0",
"express": "^4.16.3",
"husky": "^1.1.0",
"intersection-observer": "^0.5.0",
"jasmine-core": "~3.3.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^2.0.4",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.3.1",
"husky": "^4.2.5",
"intersection-observer": "^0.11.0",
"jasmine-core": "^3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.1.0",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "^2.0.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-mocha-reporter": "^2.2.5",
"lint-staged": "^8.1.0",
"ng-packagr": "^4.4.0",
"prettier": "^1.15.2",
"protractor": "~5.4.1",
"rxjs": "^6.2.0",
"standard-version": "^8.0.1",
"stylelint": "^9.8.0",
"stylelint-config-prettier": "^4.0.0",
"stylelint-config-recommended-scss": "^3.2.0",
"stylelint-config-standard": "^18.2.0",
"stylelint-order": "^2.0.0",
"stylelint-scss": "^3.4.0",
"ts-loader": "^5.2.1",
"ts-node": "~7.0.1",
"tsickle": "^0.34.0",
"tslib": "^1.9.3",
"tslint": "~5.11.0",
"lint-staged": "^10.2.11",
"ng-packagr": "^10.0.0",
"prettier": "^2.0.5",
"protractor": "^7.0.0",
"rxjs": "^6.6.0",
"standard-version": "^8.0.2",
"stylelint": "^13.6.1",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-recommended-scss": "^4.2.0",
"stylelint-config-standard": "^20.0.0",
"stylelint-order": "^4.1.0",
"stylelint-scss": "^3.18.0",
"ts-loader": "^8.0.1",
"ts-node": "^8.10.2",
"tslint": "~6.1.0",
"tslint-config-prettier": "^1.16.0",
"typescript": "~3.4.0",
"zone.js": "^0.9.1"
"typescript": "~3.9.7",
"zone.js": "~0.10.3"
},
"config": {
"commitizen": {
Expand Down Expand Up @@ -134,5 +129,8 @@
"prettier --config .prettierrc --write",
"git add"
]
},
"dependencies": {
"tslib": "^2.0.0"
}
}
10 changes: 2 additions & 8 deletions src/app/app.server.module.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import { NgModule } from '@angular/core';
import { ServerModule } from '@angular/platform-server';
import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader';

import { AppModule } from './app.module';
import { AppComponent } from './app.component';
import { InViewportModule } from './in-viewport';

@NgModule({
imports: [
AppModule,
ServerModule,
InViewportModule.forServer(),
ModuleMapLoaderModule
],
bootstrap: [AppComponent]
imports: [AppModule, ServerModule, InViewportModule.forServer()],
bootstrap: [AppComponent],
})
export class AppServerModule {}
2 changes: 1 addition & 1 deletion src/app/in-viewport/in-viewport.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { WINDOW_MOCK } from '../window/window-mock';
exports: [InViewportDirective],
})
export class InViewportModule {
static forServer(): ModuleWithProviders {
static forServer(): ModuleWithProviders<InViewportModule> {
return {
ngModule: InViewportModule,
providers: [{ provide: WINDOW, useValue: WINDOW_MOCK }],
Expand Down
2 changes: 2 additions & 0 deletions src/main.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ if (environment.production) {
}

export { AppServerModule } from './app/app.server.module';

export { renderModule, renderModuleFactory } from '@angular/platform-server';
30 changes: 15 additions & 15 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@
*/

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
import 'core-js/es/symbol';
import 'core-js/es/object';
import 'core-js/es/function';
import 'core-js/es/parse-int';
import 'core-js/es/parse-float';
import 'core-js/es/number';
import 'core-js/es/math';
import 'core-js/es/string';
import 'core-js/es/date';
import 'core-js/es/array';
import 'core-js/es/regexp';
import 'core-js/es/map';
import 'core-js/es/weak-map';
import 'core-js/es/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';
// import 'core-js/es/reflect';

/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
Expand Down
6 changes: 3 additions & 3 deletions src/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"types": []
},
"exclude": ["test.ts", "**/*.spec.ts"]
"files": ["main.ts", "polyfills.ts"],
"include": ["src/**/*.d.ts"]
}
7 changes: 5 additions & 2 deletions src/tsconfig.server.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
"extends": "./tsconfig.app.json",
"compilerOptions": {
"outDir": "../out-tsc/app-server",
"baseUrl": "."
"baseUrl": ".",
"target": "es2016"
},
"angularCompilerOptions": {
"entryModule": "app/app.server.module#AppServerModule"
}
},
"files": ["main.server.ts"],
"include": ["src/**/*.d.ts"]
}
3 changes: 1 addition & 2 deletions src/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"baseUrl": "./",
"module": "commonjs",
"target": "es5",
"types": ["jasmine", "node"]
},
Expand Down
15 changes: 15 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compileOnSave": false,
"compilerOptions": {
"module": "es2020",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": ["node_modules/@types"],
"lib": ["es2017", "dom"]
}
}
32 changes: 19 additions & 13 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
/*
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
It is not intended to be used to perform a compilation.

To learn more about this file see: https://angular.io/config/solution-tsconfig.
*/
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": ["node_modules/@types"],
"lib": ["es2017", "dom"]
}
}
"files": [],
"references": [
{
"path": "./src/tsconfig.app.json"
},
{
"path": "./src/tsconfig.spec.json"
},
{
"path": "./src/tsconfig.server.json"
}
]
}
4 changes: 3 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"deprecation": {
"severity": "warning"
},
"forin": true,
"import-blacklist": [
true,
Expand Down Expand Up @@ -53,7 +56,6 @@
"no-switch-case-fall-through": true,
"no-unnecessary-initializer": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"prefer-const": true,
Expand Down
Loading