Skip to content

Commit

Permalink
feat: upgrade to angular 10
Browse files Browse the repository at this point in the history
BREAKING CHANGE: requires angular > v10
  • Loading branch information
scttcper committed Jul 12, 2020
1 parent 29904a0 commit 206bcb1
Show file tree
Hide file tree
Showing 23 changed files with 2,662 additions and 9,365 deletions.
11 changes: 8 additions & 3 deletions browserslist → .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

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

> 0.5%
last 2 versions
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major version
last 2 iOS major versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
jobs:
test:
docker:
- image: circleci/node:12-browsers
- image: circleci/node:14-browsers
environment:
CHROME_BIN: '/usr/bin/google-chrome'
steps:
Expand All @@ -27,12 +27,12 @@ jobs:
command: bash <(curl -s https://codecov.io/bash)
release:
docker:
- image: circleci/node:12
- image: circleci/node:14
steps:
- checkout
- run: npm ci
- run: npm run build
- run: npm run semantic-release
- run: cd dist && npx semantic-release

workflows:
version: 2
Expand Down
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Editor configuration, see http://editorconfig.org
# Editor configuration, see https://editorconfig.org
root = true

[*]
Expand All @@ -8,6 +8,9 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12
14
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"printWidth": 100,
"arrowParens": "avoid"
}
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ npm install ng2-adsense

Latest version available for each version of Angular

| ng2-adsense | Angular |
| ----------------- | ----------- |
| 5.4.3 | 5.x 6.x 7.x |
| 6.0.3 | 8.x |
| current | >= 9.x |
| ng2-adsense | Angular |
| ----------- | ----------- |
| 5.4.3 | 5.x 6.x 7.x |
| 6.0.3 | 8.x |
| 8.0.1 | 9.x |
| current | >= 10.x |

## Use

Expand Down Expand Up @@ -64,21 +65,21 @@ Uses global defaults which can be overriden via inputs
## Inputs
| input | type | description |
| ------------ | ------------- | --------------------------------------------------------------------- |
| adClient | string | account ca-pub-XXXXXXXXXXXXXXXX |
| adSlot | string/number | ad slot/number |
| adFormat | string | adsense ad format |
| adRegion | string | older adsense code to make all ads on page the same |
| display | string | element display style |
| fullWidthResponsive | boolean | enable full width responsive ad |
| height | number | element height in px |
| width | number | element width in px |
| layout | string | used for in-feed ads |
| layoutKey | string | used for in-feed ads |
| pageLevelAds | boolean | enable page-level ads |
| adtest | string | sets up some sort of google test ad |
| className | string | add custom class names to the "ins" element |
| input | type | description |
| ------------------- | ------------- | --------------------------------------------------- |
| adClient | string | account ca-pub-XXXXXXXXXXXXXXXX |
| adSlot | string/number | ad slot/number |
| adFormat | string | adsense ad format |
| adRegion | string | older adsense code to make all ads on page the same |
| display | string | element display style |
| fullWidthResponsive | boolean | enable full width responsive ad |
| height | number | element height in px |
| width | number | element width in px |
| layout | string | used for in-feed ads |
| layoutKey | string | used for in-feed ads |
| pageLevelAds | boolean | enable page-level ads |
| adtest | string | sets up some sort of google test ad |
| className | string | add custom class names to the "ins" element |
```html
<ng-adsense
Expand Down
17 changes: 12 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
"projects": {
"ng2-adsense": {
"projectType": "application",
"schematics": {},
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
Expand Down Expand Up @@ -47,13 +54,13 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
"maximumWarning": "2kb",
"maximumError": "4kb"
}
]
}
Expand Down
15 changes: 7 additions & 8 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function(config) {
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
Expand All @@ -10,18 +10,17 @@ module.exports = function(config) {
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-mocha-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage'),
dir: require('path').join(__dirname, './coverage/zzz'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true,
fixWebpackSourcePaths: true
},
reporters: ['mocha', 'kjhtml'],
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand All @@ -34,6 +33,6 @@ module.exports = function(config) {
},
},
singleRun: false,
restartOnFileChange: true,
restartOnFileChange: true
});
};
Loading

0 comments on commit 206bcb1

Please sign in to comment.