Skip to content
Closed
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
81 changes: 33 additions & 48 deletions aio/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,23 @@
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "aio",
"schematics": {
"@schematics/angular:component": {
"inlineStyle": true,
"style": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"webWorkerTsConfig": "src/tsconfig.worker.json",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"webWorkerTsConfig": "tsconfig.worker.json",
"aot": true,
"optimization": true,
"buildOptimizer": true,
Expand All @@ -32,7 +40,6 @@
"extractLicenses": true,
"namedChunks": true,
"vendorChunk": false,
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/generated",
Expand Down Expand Up @@ -61,26 +68,26 @@
"next": {
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.next.ts"
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.next.ts"
}
],
"serviceWorker": true
},
"stable": {
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.stable.ts"
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.stable.ts"
}
],
"serviceWorker": true
},
"archive": {
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.archive.ts"
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.archive.ts"
}
],
"serviceWorker": true
Expand Down Expand Up @@ -120,14 +127,10 @@
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "src/karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"webWorkerTsConfig": "src/tsconfig.worker.json",
"scripts": [],
"styles": [
"src/styles.scss"
],
"tsConfig": "tsconfig.spec.json",
"webWorkerTsConfig": "tsconfig.worker.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/assets",
"src/generated",
Expand All @@ -143,27 +146,27 @@
"input": "node_modules/@webcomponents/custom-elements/src",
"output": "/assets/js"
}
]
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
"tsconfig.app.json",
"tsconfig.spec.json",
"tsconfig.worker.json",
"tests/e2e/tsconfig.json"
],
"exclude": []
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"site-e2e": {
"root": "",
"projectType": "application",
"cli": {},
"schematics": {},
"architect": {
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
Expand All @@ -175,27 +178,9 @@
"devServerTarget": "site:serve:ci"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tests/e2e/tsconfig.e2e.json"
],
"exclude": []
}
}
}
}
},
"schematics": {
"@schematics/angular:component": {
"inlineStyle": true,
"prefix": "aio",
"styleext": "scss"
},
"@schematics/angular:directive": {
"prefix": "aio"
}
}
"defaultProject": "site"
}
13 changes: 13 additions & 0 deletions aio/browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# Googlebot uses an older version of Chrome
# For additional information see: https://developers.google.com/search/docs/guides/rendering

> 0.5%
last 2 versions
Firefox ESR
not dead
IE 9-11 # For IE 9-11 support.
Chrome 41 # For Googlebot support.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Directive, ElementRef, EventEmitter, Output } from '@angular/core';
export class ClickDirective {
// #docregion output-myClick
@Output('myClick') clicks = new EventEmitter<string>(); // @Output(alias) propertyName = ...
// #enddocregion output-myClick
// #enddocregion output-myClick

toggle = false;

Expand All @@ -23,10 +23,12 @@ export class ClickDirective {
@Directive({
// #enddocregion output-myClick2
selector: '[myClick2]',
// tslint:disable: no-outputs-metadata-property
// #docregion output-myClick2
outputs: ['clicks:myClick'] // propertyName:alias
})
// #enddocregion output-myClick2
// tslint:enable: no-outputs-metadata-property
export class ClickDirective2 {
clicks = new EventEmitter<string>();
toggle = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import { Hero } from './hero';
@Component({
// #enddocregion input-output-2
selector: 'app-hero-detail',
// tslint:disable: no-inputs-metadata-property no-outputs-metadata-property
// #docregion input-output-2
inputs: ['hero'],
outputs: ['deleteRequest'],
// #enddocregion input-output-2
// tslint:enable: no-inputs-metadata-property no-outputs-metadata-property
styles: ['button {margin-left: 8px} div {margin: 8px 0} img {height:24px}'],
// #docregion template-1
template: `
Expand Down
6 changes: 3 additions & 3 deletions aio/content/examples/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-use-before-declare": false,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
Expand Down Expand Up @@ -83,8 +83,8 @@
"check-type"
],

"use-input-property-decorator": true,
"use-output-property-decorator": true,
"no-inputs-metadata-property": true,
"no-outputs-metadata-property": true,
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
Expand Down
5 changes: 3 additions & 2 deletions aio/src/karma.conf.js → aio/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
dir: require('path').join(__dirname, './coverage/site'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
Expand All @@ -28,5 +28,6 @@ module.exports = function (config) {
browsers: ['Chrome'],
browserNoActivityTimeout: 60000,
singleRun: false,
restartOnFileChange: true
});
};
5 changes: 3 additions & 2 deletions aio/ngsw-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"/assets/images/favicons/favicon.ico",
"/assets/js/*.js",
"/*.css",
"/*.js"
"/*.js",
"!/*-es5*.js"
],
"urls": [
"https://fonts.googleapis.com/**",
Expand All @@ -38,7 +39,7 @@
"resources": {
"files": [
"/assets/images/favicons/**",
"/generated/ie-polyfills.min.js",
"/*-es5*.js",
"!/**/_unused/**"
]
}
Expand Down
54 changes: 25 additions & 29 deletions aio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"e2e": "ng e2e --no-webdriver-update",
"presetup": "yarn --cwd .. install && yarn install --frozen-lockfile && yarn ~~check-env && yarn ~~clean-generated && yarn boilerplate:remove",
"setup": "yarn aio-use-npm && yarn example-use-npm",
"postsetup": "yarn ~~build-ie-polyfills && yarn boilerplate:add && yarn extract-cli-command-docs && yarn docs",
"postsetup": "yarn boilerplate:add && yarn extract-cli-command-docs && yarn docs",
"presetup-local": "yarn presetup",
"setup-local": "yarn aio-use-local && yarn example-use-local",
"postsetup-local": "yarn postsetup",
Expand All @@ -36,7 +36,7 @@
"test-pwa-score": "node scripts/test-pwa-score",
"test-pwa-score-localhost": "run-p --race \"~~http-server dist -p 4200 --silent\" \"test-pwa-score http://localhost:4200 {1} {2}\" --",
"example-e2e": "yarn example-check-local && node ./tools/examples/run-example-e2e",
"example-lint": "tslint -c \"content/examples/tslint.json\" \"content/examples/**/*.ts\" -e \"content/examples/styleguide/**/*.avoid.ts\"",
"example-lint": "tslint --config \"content/examples/tslint.json\" \"content/examples/**/*.ts\" --exclude \"content/examples/styleguide/**/*.avoid.ts\"",
"example-use-local": "node tools/ng-packages-installer overwrite ./tools/examples/shared --debug",
"example-use-npm": "node tools/ng-packages-installer restore ./tools/examples/shared",
"example-check-local": "node tools/ng-packages-installer check ./tools/examples/shared",
Expand All @@ -50,9 +50,9 @@
"docs-watch": "node tools/transforms/authors-package/watchr.js",
"docs-lint": "eslint --ignore-path=\"tools/transforms/.eslintignore\" tools/transforms",
"docs-test": "node tools/transforms/test.js",
"redirects-test": "jasmine-ts tests/deployment/unit/**/*.spec.ts",
"firebase-utils-test": "jasmine-ts tools/firebase-test-utils/*.spec.ts",
"tools-lint": "tslint -c \"tools/tslint.json\" \"tools/firebase-test-utils/**/*.ts\"",
"redirects-test": "jasmine-ts --project=tests/deployment/unit tests/deployment/unit/**/*.spec.ts",
"firebase-utils-test": "jasmine-ts --project=tools/firebase-test-utils tools/firebase-test-utils/*.spec.ts",
"tools-lint": "tslint --config \"tools/tslint.json\" --project \"tools/firebase-test-utils\"",
"tools-test": "./scripts/deploy-to-firebase.test.sh && yarn docs-test && yarn boilerplate:test && jasmine tools/ng-packages-installer/index.spec.js && yarn firebase-utils-test",
"preserve-and-sync": "yarn docs",
"serve-and-sync": "run-p \"start\" \"docs-watch --watch-only\"",
Expand All @@ -68,7 +68,6 @@
"~~clean-generated": "node --eval \"require('shelljs').rm('-rf', 'src/generated')\"",
"~~build": "ng build --configuration=stable",
"post~~build": "yarn build-404-page",
"~~build-ie-polyfills": "webpack-cli src/ie-polyfills.js -o src/generated/ie-polyfills.min.js --mode production",
"~~http-server": "http-server"
},
"engines": {
Expand All @@ -77,40 +76,39 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^7.0.0",
"@angular/cdk": "7.0.0",
"@angular/common": "^7.0.0",
"@angular/core": "^7.0.0",
"@angular/elements": "^7.0.0",
"@angular/forms": "^7.0.0",
"@angular/material": "7.0.0",
"@angular/platform-browser": "^7.0.0",
"@angular/platform-browser-dynamic": "^7.0.0",
"@angular/router": "^7.0.0",
"@angular/service-worker": "^7.0.0",
"@angular/animations": "^8.0.0-beta.14",
"@angular/cdk": "8.0.0-beta.2",
"@angular/common": "^8.0.0-beta.14",
"@angular/core": "^8.0.0-beta.14",
"@angular/elements": "^8.0.0-beta.14",
"@angular/forms": "^8.0.0-beta.14",
"@angular/material": "8.0.0-beta.2",
"@angular/platform-browser": "^8.0.0-beta.14",
"@angular/platform-browser-dynamic": "^8.0.0-beta.14",
"@angular/router": "^8.0.0-beta.14",
"@angular/service-worker": "^8.0.0-beta.14",
"@types/lunr": "^2.3.2",
"@webcomponents/custom-elements": "^1.2.0",
"classlist.js": "^1.1.20150312",
"core-js": "^2.4.1",
"rxjs": "^6.5.1",
"zone.js": "^0.9.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.800.0-beta.13",
"@angular/cli": "8.0.0-beta.13",
"@angular/compiler": "^7.0.0",
"@angular/compiler-cli": "^7.0.0",
"@angular/language-service": "^7.0.0",
"@angular-devkit/build-angular": "0.800.0-beta.18",
"@angular/cli": "8.0.0-beta.18",
"@angular/compiler": "^8.0.0-beta.14",
"@angular/compiler-cli": "^8.0.0-beta.14",
"@angular/language-service": "^8.0.0-beta.14",
"@types/jasmine": "^2.5.52",
"@types/jasminewd2": "^2.0.4",
"@types/node": "~6.0.60",
"@types/xregexp": "^3.0.29",
"@yarnpkg/lockfile": "^1.1.0",
"archiver": "^1.3.0",
"canonical-path": "1.0.0",
"chalk": "^2.1.0",
"chrome-launcher": "^0.10.5",
"cjson": "^0.5.0",
"codelyzer": "~4.5.0",
"codelyzer": "^5.0.0",
"cross-spawn": "^5.1.0",
"css-selector-parser": "^1.3.0",
"dgeni": "^0.4.11",
Expand Down Expand Up @@ -158,16 +156,14 @@
"tree-kill": "^1.1.0",
"ts-node": "^3.3.0",
"tslib": "^1.9.0",
"tslint": "~5.9.1",
"typescript": "~3.4.2",
"tslint": "~5.15.0",
"typescript": "~3.4.5",
"uglify-js": "^3.0.15",
"unist-util-filter": "^0.2.1",
"unist-util-source": "^1.0.1",
"unist-util-visit": "^1.1.1",
"unist-util-visit-parents": "^1.1.1",
"vrsource-tslint-rules": "^5.8.2",
"watchr": "^3.0.1",
"webpack-cli": "^3.1.2",
"xregexp": "^4.0.0",
"yargs": "^7.0.2"
}
Expand Down
9 changes: 6 additions & 3 deletions aio/scripts/_payload-limits.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
"aio": {
"master": {
"uncompressed": {
"runtime": 2972,
"main": 479228,
"polyfills": 59197
"runtime-es5": 2980,
"runtime-es2015": 2986,
"main-es5": 501356,
"main-es2015": 440336,
"polyfills-es5": 128751,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we doubled the size of the polyfills compared to the previous version. do we know what's causing it? this seems like a size regression to fix.

// @filipesilva

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alan-agius4 @clydin I think you both looked at the polyfills changes with diff. loading, can you shed some light here (and on the comment below)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The polyfills-es5 file includes the ES2015 polyfills (i.e. former polyfills.js) plus the ES5 specific polyfills, so it is expected to be larger.
@IgorMinar, it is basically combining the former polyfills.js with our ie-polyfills.js.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was just typing a similar response. @gkalpak is correct. The CLI now automatically handles (and removes the need for) the ie-polyfills file previously used in AIO.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. That makes sense. It’s a bit surprising but with an explanation it makes sense

"polyfills-es2015": 59557

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no size reduction compared to v7 es5 polyfill bundle? that seems odd, zone.js alone should have helped to drop the size now that it should be differentially served. is that happening?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clydin, do you know if Zone.js' differentiality is taken advantage of here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's currently not implemented in the CLI.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we forget to create a Jira item for this? We discussed it but might have forgotten to schedule. Can you please add to the backlog for v8? Thanks

@clydin clydin Apr 25, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a PR to add it in: angular/angular-cli#14273
~6Kb savings

}
}
}
Expand Down
Loading