Skip to content

Commit

Permalink
Merge pull request #12 from jackkoppa/ng-6-upgrade
Browse files Browse the repository at this point in the history
Angular 6 upgrade
  • Loading branch information
jackkoppa authored Aug 9, 2018
2 parents fd5ed60 + 8a41a84 commit acd3596
Show file tree
Hide file tree
Showing 31 changed files with 8,607 additions and 5,423 deletions.
66 changes: 0 additions & 66 deletions .angular-cli.json

This file was deleted.

4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

language: node_js
node_js:
- "8.7"
- "10.8"

branches:
only:
Expand All @@ -21,4 +21,4 @@ notifications:
email:
on_failure: change

sudo: required
sudo: required
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ ng serve
Livereloading dev server now available at `http://localhost:4200/`

### Run w/ Service Worker
Since the Angular [`ServiceWorkerModule`](https://angular.io/api/service-worker/ServiceWorkerModule) cannot be tested using the normal Webpack dev server, run the steps above, but instead of `ng serve`, run:
```shell
npm install -g http-server
npm run sw-build
cd dist
http-server -p 8080
```
Since the Angular [`ServiceWorkerModule`](https://angular.io/api/service-worker/ServiceWorkerModule) cannot be tested using the normal Webpack dev server, run the steps above, but instead of `ng serve`, run `npm run sw-serve`

Server now available at `http://localhost:8080/`, without livereload

## Contributors
Expand Down
139 changes: 139 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"cityaq": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico",
"src/manifest.json"
],
"styles": [
"src/sass/main.scss"
],
"scripts": []
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"serviceWorker": true,
"ngswConfigPath": "src/ngsw-config.json",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "cityaq:build"
},
"configurations": {
"production": {
"browserTarget": "cityaq:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "cityaq:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [
"src/sass/main.scss"
],
"assets": [
"src/assets",
"src/favicon.ico",
"src/manifest.json"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"cityaq-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "cityaq:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "cityaq",
"schematics": {
"@schematics/angular:class": {
"spec": false
},
"@schematics/angular:component": {
"prefix": "app",
"styleext": "scss"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
}
10 changes: 4 additions & 6 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
require('@angular-devkit/build-angular/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},

reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
Expand Down
Loading

0 comments on commit acd3596

Please sign in to comment.