Skip to content

Commit

Permalink
feat: upgrade to angular 8 (#699)
Browse files Browse the repository at this point in the history
feat: upgrade to angular 8
  • Loading branch information
scttcper committed Sep 25, 2019
2 parents e9aeeb7 + 9e1e345 commit ebfa559
Show file tree
Hide file tree
Showing 22 changed files with 10,092 additions and 8,775 deletions.
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Scott Cooper
Copyright (c) Scott Cooper <scttcper@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<a href="https://www.npmjs.org/package/ngx-toastr">
<img src="https://badge.fury.io/js/ngx-toastr.svg" alt="npm">
</a>
<a href="https://travis-ci.org/scttcper/ngx-toastr">
<img src="https://travis-ci.org/scttcper/ngx-toastr.svg?branch=master" alt="travis">
<a href="https://circleci.com/gh/scttcper/ngx-toastr">
<img src="https://circleci.com/gh/scttcper/ngx-toastr.svg?style=svg" alt="circleci">
</a>
<a href="https://codecov.io/github/scttcper/ngx-toastr">
<img src="https://img.shields.io/codecov/c/github/scttcper/ngx-toastr.svg" alt="codecov">
Expand All @@ -32,11 +32,12 @@ DEMO: https://ngx-toastr.netlify.com/
## Dependencies
Latest version available for each version of Angular

| ngx-toastr | Angular |
| ------------ | ------- |
| 6.5.0 | 4.x |
| 8.10.2 | 5.x |
| 10.0.4 | 8.x 7.x 6.x |
| ngx-toastr | Angular |
| ---------- | ----------- |
| 6.5.0 | 4.x |
| 8.10.2 | 5.x |
| 10.1.0 | 8.x 7.x 6.x |
| current | >= 8.x |

## Install

Expand Down Expand Up @@ -166,15 +167,15 @@ All [individual options](#individual-options) can be overridden in the global
options to affect all toasts. In addition, global options include the following
options:

| Option | Type | Default | Description |
| ----------------------- | ------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| maxOpened | number | 0 | Max toasts opened. Toasts will be queued. 0 is unlimited |
| autoDismiss | boolean | false | Dismiss current toast when max is reached |
| iconClasses | object | [see below](#iconclasses-defaults) | Classes used on toastr service methods |
| newestOnTop | boolean | true | New toast placement |
| preventDuplicates | boolean | false | Block duplicate messages |
| countDuplicates | boolean | false | Displays a duplicates counter (preventDuplicates must be true). Toast must have a title and duplicate message |
| resetTimeoutOnDuplicate | boolean | false | Reset toast timeout on duplicate (preventDuplicates must be true) |
| Option | Type | Default | Description |
| ----------------------- | ------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| maxOpened | number | 0 | Max toasts opened. Toasts will be queued. 0 is unlimited |
| autoDismiss | boolean | false | Dismiss current toast when max is reached |
| iconClasses | object | [see below](#iconclasses-defaults) | Classes used on toastr service methods |
| newestOnTop | boolean | true | New toast placement |
| preventDuplicates | boolean | false | Block duplicate messages |
| countDuplicates | boolean | false | Displays a duplicates counter (preventDuplicates must be true). Toast must have a title and duplicate message |
| resetTimeoutOnDuplicate | boolean | false | Reset toast timeout on duplicate (preventDuplicates must be true) |

##### iconClasses defaults

Expand Down
72 changes: 27 additions & 45 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"newProjectRoot": "projects",
"projects": {
"ngx-toastr": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
Expand All @@ -17,7 +17,8 @@
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"aot": false,
"assets": [
"src/favicon.ico",
"src/assets"
Expand All @@ -43,7 +44,19 @@
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
Expand All @@ -68,63 +81,32 @@
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"browsers": "ChromeCI",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": [],
"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": {
"format": "stylish",
"typeCheck": true,
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
"tsconfig.app.json",
"tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"ngx-toastr-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "ngx-toastr:serve"
},
"configurations": {
"production": {
"devServerTarget": "ngx-toastr:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
}},
"defaultProject": "ngx-toastr"
}
51 changes: 51 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
version: 2.1
jobs:
test:
docker:
- image: circleci/node:10-browsers
environment:
CHROME_BIN: '/usr/bin/google-chrome'
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: npm-install
command: npm ci
- save_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
paths:
- ~/.npm
- run:
name: test
command: npm run test:ci
- run:
name: lint
command: npm run lint
- run:
name: codecov
command: bash <(curl -s https://codecov.io/bash)
release:
docker:
- image: circleci/node:10
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run: npm ci
- run: npm run build
- run: npm run semantic-release

workflows:
version: 2
test_and_release:
# Run the test jobs first, then the release only when all the test jobs are successful
jobs:
- test
- release:
filters:
branches:
only:
- master
requires:
- test
6 changes: 3 additions & 3 deletions src/karma.conf.js → karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ 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'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true,
},
reporters: ['mocha', 'kjhtml'],
port: 9876,
browserDisconnectTimeout: 10000,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
Expand All @@ -35,5 +34,6 @@ module.exports = function(config) {
},
},
singleRun: false,
restartOnFileChange: true,
});
};

0 comments on commit ebfa559

Please sign in to comment.