Skip to content

Commit

Permalink
feat(workspace): update to Angular 10, run migrations, prettier, closes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomastrajan committed Jun 28, 2020
1 parent 8048327 commit 9f7ce5d
Show file tree
Hide file tree
Showing 111 changed files with 21,046 additions and 18,991 deletions.
38,342 changes: 20,162 additions & 18,180 deletions package-lock.json

Large diffs are not rendered by default.

245 changes: 122 additions & 123 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,123 +1,122 @@
{
"name": "@angular-extensions/elements",
"version": "10.0.0-alpha.1",
"scripts": {
"ng": "ng",
"start": "ng serve -o",
"start:prod": "npm run build && node ./projects/elements-server/server.js",
"lint": "ng lint",
"test": "ng lint && npm run format:test && ng test --watch false --codeCoverage",
"watch": "ng test",
"e2e": "ng e2e",
"build": "ng build --project elements --prod && ng build --prod ",
"postbuild": "replace \"onFetch.*\\{\" \"onFetch(event) { if (event.request.url.indexOf('unpkg.com') > -1) { return; }\" ./dist/elements-demo/ngsw-worker.js",
"ci": "npm run test && npm run build && cpx README.md dist/elements",
"format:write": "prettier projects/**/*.{ts,json,md} --write",
"format:test": "prettier projects/**/*.{ts,json,md} --list-different",
"release": "standard-version -a && git push --follow-tags origin master",
"analyze": "ng build --prod --stats-json && webpack-bundle-analyzer ./dist/elements-demo/stats-es2015.json",
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate && node sync-contributors.js",
"contributors:check": "all-contributors check"
},
"standard-version": {
"scripts": {
"precommit": "node sync-versions.js && git add ."
}
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "pretty-quick --staged"
}
},
"private": false,
"dependencies": {
"@angular/animations": "^9.0.0",
"@angular/cdk": "^9.0.0",
"@angular/common": "^9.0.0",
"@angular/compiler": "^9.0.0",
"@angular/core": "^9.0.0",
"@angular/forms": "^9.0.0",
"@angular/material": "^9.0.0",
"@angular/platform-browser": "^9.0.0",
"@angular/platform-browser-dynamic": "^9.0.0",
"@angular/pwa": "^0.900.0",
"@angular/router": "^9.0.0",
"@angular/service-worker": "^9.0.0",
"hammerjs": "^2.0.8",
"highlight.js": "^9.15.8",
"ngx-highlightjs": "^4.0.2",
"rxjs": "^6.5.4",
"tslib": "^1.10.0",
"zone.js": "^0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.0",
"@angular-devkit/build-ng-packagr": "^0.900.0",
"@angular/cli": "^9.0.0",
"@angular/compiler-cli": "^9.0.0",
"@angular/language-service": "^9.0.0",
"@commitlint/cli": "^8.0.0",
"@commitlint/config-conventional": "^8.0.0",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~12.11.0",
"all-contributors-cli": "~5.4.1",
"codelyzer": "^5.0.0",
"compression": "^1.7.4",
"cpx": "^1.5.0",
"cz-conventional-changelog": "^3.0.2",
"express": "^4.17.1",
"husky": "^2.4.1",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-spec-reporter": "0.0.32",
"ng-packagr": "^9.0.0",
"prettier": "^1.19.1",
"pretty-quick": "^1.11.1",
"protractor": "~5.4.0",
"replace": "^1.1.0",
"standard-version": "^6.0.1",
"ts-node": "~8.3.0",
"tsickle": "^0.35.0",
"tslint": "~5.18.0",
"typescript": "~3.7.0",
"webpack-bundle-analyzer": "^3.5.0"
},
"keywords": [
"angular",
"elements",
"web componentst",
"custom elements",
"lazy loading",
"microfrontends",
"components",
"web component"
],
"author": "Tomas Trajan <@tomastrajan>",
"license": "MIT",
"homepage": "https://github.com/angular-extensions/elements#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/angular-extensions/elements.git"
},
"bugs": {
"url": "https://github.com/angular-extensions/elements/issues"
}
}
{
"name": "@angular-extensions/elements",
"version": "10.0.0-alpha.1",
"scripts": {
"ng": "ng",
"start": "ng serve -o",
"start:prod": "npm run build && node ./projects/elements-server/server.js",
"lint": "ng lint",
"test": "ng lint && npm run format:test && ng test --watch false --codeCoverage",
"watch": "ng test",
"e2e": "ng e2e",
"build": "ng build --project elements --prod && ng build --prod ",
"postbuild": "replace \"onFetch.*\\{\" \"onFetch(event) { if (event.request.url.indexOf('unpkg.com') > -1) { return; }\" ./dist/elements-demo/ngsw-worker.js",
"ci": "npm run test && npm run build && cpx README.md dist/elements",
"format:write": "prettier projects/**/*.{ts,json,md} --write",
"format:test": "prettier projects/**/*.{ts,json,md} --list-different",
"release": "standard-version -a && git push --follow-tags origin master",
"analyze": "ng build --prod --stats-json && webpack-bundle-analyzer ./dist/elements-demo/stats-es2015.json",
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate && node sync-contributors.js",
"contributors:check": "all-contributors check"
},
"standard-version": {
"scripts": {
"precommit": "node sync-versions.js && git add ."
}
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "pretty-quick --staged"
}
},
"private": false,
"dependencies": {
"@angular/animations": "^10.0.1",
"@angular/cdk": "^10.0.0",
"@angular/common": "^10.0.1",
"@angular/compiler": "^10.0.1",
"@angular/core": "^10.0.1",
"@angular/forms": "^10.0.1",
"@angular/material": "^10.0.0",
"@angular/platform-browser": "^10.0.1",
"@angular/platform-browser-dynamic": "^10.0.1",
"@angular/pwa": "^0.1000.0",
"@angular/router": "^10.0.1",
"@angular/service-worker": "^10.0.1",
"highlight.js": "^10.1.1",
"ngx-highlightjs": "^4.1.0-beta",
"rxjs": "^6.5.5",
"tslib": "^2.0.0",
"zone.js": "^0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1000.0",
"@angular-devkit/build-ng-packagr": "^0.1000.0",
"@angular/cli": "^10.0.0",
"@angular/compiler-cli": "^10.0.1",
"@angular/language-service": "^10.0.1",
"@commitlint/cli": "^9.0.1",
"@commitlint/config-conventional": "^9.0.1",
"@types/jasmine": "~3.5.11",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~14.0.14",
"all-contributors-cli": "~6.16.1",
"codelyzer": "^5.2.2",
"compression": "^1.7.4",
"cpx": "^1.5.0",
"cz-conventional-changelog": "^3.2.0",
"express": "^4.17.1",
"husky": "^4.2.5",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-spec-reporter": "0.0.32",
"ng-packagr": "^10.0.0",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"protractor": "~7.0.0",
"replace": "^1.2.0",
"standard-version": "^8.0.0",
"ts-node": "~8.10.2",
"tsickle": "^0.38.1",
"tslint": "~6.1.0",
"typescript": "~3.9.5",
"webpack-bundle-analyzer": "^3.8.0"
},
"keywords": [
"angular",
"elements",
"web componentst",
"custom elements",
"lazy loading",
"microfrontends",
"components",
"web component"
],
"author": "Tomas Trajan <@tomastrajan>",
"license": "MIT",
"homepage": "https://github.com/angular-extensions/elements#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/angular-extensions/elements.git"
},
"bugs": {
"url": "https://github.com/angular-extensions/elements/issues"
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 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

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
# 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

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
7 changes: 2 additions & 5 deletions projects/elements-demo/e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ describe('workspace-project App', () => {

afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser
.manage()
.logs()
.get(logging.Type.BROWSER);
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(
jasmine.objectContaining({
level: logging.Level.SEVERE
level: logging.Level.SEVERE,
} as logging.Entry)
);
});
Expand Down
4 changes: 2 additions & 2 deletions projects/elements-demo/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extends": "../../../tsconfig.json",
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "../../../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"target": "es2018",
"types": ["jasmine", "jasminewd2", "node"]
}
}
22 changes: 12 additions & 10 deletions projects/elements-demo/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,31 @@ import { HomeComponent } from './features/home/home/home.component';
const routes: Routes = [
{
path: 'home',
component: HomeComponent
component: HomeComponent,
},
{
path: 'docs',
loadChildren: () =>
import('./features/docs/docs.module').then(m => m.DocsModule)
import('./features/docs/docs.module').then((m) => m.DocsModule),
},
{
path: 'examples',
loadChildren: () =>
import('./features/examples/examples.module').then(m => m.ExamplesModule)
import('./features/examples/examples.module').then(
(m) => m.ExamplesModule
),
},
{
path: 'contribute',
loadChildren: () =>
import('./features/contribute/contribute.module').then(
m => m.ContributeModule
)
(m) => m.ContributeModule
),
},
{
path: '**',
redirectTo: 'home'
}
redirectTo: 'home',
},
];

@NgModule({
Expand All @@ -38,9 +40,9 @@ const routes: Routes = [
scrollPositionRestoration: 'enabled',
anchorScrolling: 'enabled',
onSameUrlNavigation: 'reload',
scrollOffset: [0, 100]
})
scrollOffset: [0, 100],
}),
],
exports: [RouterModule]
exports: [RouterModule],
})
export class AppRoutingModule {}
8 changes: 4 additions & 4 deletions projects/elements-demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { RefreshService } from './core/refresh.service';
@Component({
selector: 'demo-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
styleUrls: ['./app.component.scss'],
})
export class AppComponent implements OnInit {
@HostBinding('class')
Expand All @@ -36,7 +36,7 @@ export class AppComponent implements OnInit {

this.isSmallOrSmaller = combineLatest([
this.responsiveLayoutService.isSmallOrSmaller,
this.responsiveLayoutService.isLargeOrBigger
this.responsiveLayoutService.isLargeOrBigger,
]).pipe(
delay(1),
tap(([isSmall, isLarge]) => {
Expand All @@ -53,13 +53,13 @@ export class AppComponent implements OnInit {

this.navOpened = combineLatest([
this.isSmallOrSmaller,
this.navToggled
this.navToggled,
]).pipe(
map(([isSmallScreen, navToggled]) => (!isSmallScreen ? true : navToggled))
);

this.sidenavMode = this.isSmallOrSmaller.pipe(
map(isSmallOrSmaller => (isSmallOrSmaller ? 'push' : 'side'))
map((isSmallOrSmaller) => (isSmallOrSmaller ? 'push' : 'side'))
);
}

Expand Down

0 comments on commit 9f7ce5d

Please sign in to comment.