Skip to content

Commit

Permalink
chore: upgrade @angular/cli to v8
Browse files Browse the repository at this point in the history
  • Loading branch information
willmendesneto committed Jun 10, 2019
1 parent cec3893 commit 0d54436
Show file tree
Hide file tree
Showing 33 changed files with 3,327 additions and 4,300 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

docker_defaults: &docker_defaults
docker:
- image: circleci/node:8.11.1-browsers
- image: circleci/node:11.15.0-browsers
working_directory: ~/project/repo

attach_workspace: &attach_workspace
Expand Down
6 changes: 2 additions & 4 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
**I'm submitting a ...** (check one with "x")

```
[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
```
- [ ] bug report => search github for a similar issue or PR before submitting
- [ ] feature request

**Current behavior**

Expand Down
26 changes: 13 additions & 13 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

**What kind of change does this PR introduce?** _(check one with "x")_

```
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other. Please describe:
```

- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Other. Please describe:


If it is a Bugfix, please describe the root cause and what could have been done to prevent it…

Expand All @@ -25,10 +25,10 @@ If it is a Bugfix, please describe the root cause and what could have been done

**Does this PR introduce a breaking change?** _(check one with "x")_

```
[ ] Yes
[ ] No
```

- [ ] Yes
- [ ] No


If this PR contains a breaking change, please describe the impact and migration
path for existing applications: …
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules
Expand All @@ -27,6 +29,7 @@ speed-measure-plugin.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,5 @@ For any type of contribution, please follow the instructions in [CONTRIBUTING.md

**Wilson Mendes (willmendesneto)**

- <https://plus.google.com/+WilsonMendes>
- <https://twitter.com/willmendesneto>
- <http://github.com/willmendesneto>
72 changes: 38 additions & 34 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"newProjectRoot": "projects",
"projects": {
"ngx-scroll-lock-demo": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
Expand All @@ -21,9 +21,15 @@
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"tsConfig": "tsconfig.app.json",
"aot": false,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -75,27 +81,31 @@
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": ["src/styles.scss"],
"scripts": [],
"assets": ["src/favicon.ico", "src/assets"]
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"ngx-scroll-lock-demo-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
Expand All @@ -107,20 +117,13 @@
"devServerTarget": "ngx-scroll-lock-demo:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
},
"ngx-scroll-lock": {
"projectType": "library",
"root": "projects/ngx-scroll-lock",
"sourceRoot": "projects/ngx-scroll-lock/src",
"projectType": "library",
"prefix": "lib",
"architect": {
"build": {
Expand All @@ -145,11 +148,12 @@
"projects/ngx-scroll-lock/tsconfig.lib.json",
"projects/ngx-scroll-lock/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
}},
"defaultProject": "ngx-scroll-lock-demo"
}
}
12 changes: 12 additions & 0 deletions browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +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
not IE 9-11 # For IE 9-11 support, remove 'not'.
6 changes: 5 additions & 1 deletion e2e/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');

/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
Expand All @@ -21,7 +25,7 @@ exports.config = {
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
Expand Down
11 changes: 10 additions & 1 deletion e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';

describe('workspace-project App', () => {
let page: AppPage;
Expand All @@ -9,6 +10,14 @@ describe('workspace-project App', () => {

it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('NGX Scroll locker');
expect(page.getTitleText()).toEqual('Welcome to ngx-scroll-lock-demo!');
});

afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
4 changes: 2 additions & 2 deletions e2e/src/app.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { browser, by, element } from 'protractor';

export class AppPage {
navigateTo() {
return browser.get('/');
return browser.get(browser.baseUrl) as Promise<any>;
}

getTitleText() {
return element(by.css('app-root h1')).getText();
return element(by.css('app-root h1')).getText() as Promise<string>;
}
}
4 changes: 2 additions & 2 deletions e2e/tsconfig.e2e.json → e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types": [
Expand All @@ -10,4 +10,4 @@
"node"
]
}
}
}
7 changes: 4 additions & 3 deletions src/karma.conf.js → karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
dir: require('path').join(__dirname, './coverage/ngx-scroll-lock-demo'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
Expand All @@ -26,6 +26,7 @@ module.exports = function (config) {
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
singleRun: false,
restartOnFileChange: true
});
};
};
Loading

0 comments on commit 0d54436

Please sign in to comment.