Skip to content

update to Angular 13 and partial compilation #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .browserslistrc
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
48 changes: 48 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"root": true,
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"projects/angular-mydatepicker/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "lib",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "lib",
"style": "camelCase",
"type": "attribute"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ speed-measure-plugin.json
.history/*

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ node_js:
addons:
chrome: stable
before_script:
- npm install -g @angular/cli@7.3.9
- npm install -g @angular/cli@13.0.3
- npm install
script:
- npm run test-lib
after_success:
- ./node_modules/.bin/codecov -f test-output/angular-mydatepicker/coverage-final.json
- ./node_modules/.bin/codecov -f test-output/angular-mydatepicker/coverage-final.lcov
sudo: required
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Screenshots using [predefined styles](https://github.com/kekeh/angular-mydatepic

## Browser support (tested)

| Chrome | Firefox | Edge | IE11 | Safari | iOS Safari |
| :------------- | :------------- | :----| :---------- | :----| :---------- |
| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Chrome | Firefox | Edge | Safari | iOS Safari |
| :------------- | :----| :---------- | :----| :---------- |
| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |

## Description

Expand Down
69 changes: 21 additions & 48 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@
"example/styles.css"
],
"scripts": [],
"es5BrowserSupport": true
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -39,9 +44,7 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand All @@ -50,10 +53,15 @@
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand Down Expand Up @@ -90,42 +98,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"example/tsconfig.app.json",
"example/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"angular-mydatepicker-example-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "angular-mydatepicker-example:serve"
},
"configurations": {
"production": {
"devServerTarget": "angular-mydatepicker-example:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
Expand All @@ -138,7 +115,7 @@
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/angular-mydatepicker/tsconfig.lib.json",
"project": "projects/angular-mydatepicker/ng-package.json"
Expand All @@ -153,15 +130,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/angular-mydatepicker/tsconfig.lib.json",
"projects/angular-mydatepicker/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**",
"**/*.spec.ts"
"lintFilePatterns": [
"projects/angular-mydatepicker/src/**/*.ts",
"projects/angular-mydatepicker/**/*.html"
]
}
}
Expand Down
28 changes: 0 additions & 28 deletions e2e/protractor.conf.js

This file was deleted.

23 changes: 0 additions & 23 deletions e2e/src/app.e2e-spec.ts

This file was deleted.

11 changes: 0 additions & 11 deletions e2e/src/app.po.ts

This file was deleted.

13 changes: 0 additions & 13 deletions e2e/tsconfig.e2e.json

This file was deleted.

2 changes: 1 addition & 1 deletion example/browserslist → example/.browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
last 2 versions
Firefox ESR
not dead
not IE 9-11
not IE 9-11
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, OnInit, Renderer2,} from '@angular/core';
import {Component, OnInit, Renderer2, } from '@angular/core';
import {IAngularMyDpOptions, IMyDateModel, IMyCalendarViewChanged} from '../../../projects/angular-mydatepicker/src/public-api';

@Component({
Expand All @@ -22,12 +22,12 @@ export class DatePickerDivHostElement implements OnInit {
}

setTodayDate(): void {
let d: Date = new Date();
const d: Date = new Date();
this.model = {isRange: false, singleDate: {jsDate: d}, dateRange: null};
}

resetTomorrowDate(): void {
let d: Date = new Date();
const d: Date = new Date();
d.setDate(d.getDate() + 1);
this.model = {isRange: false, singleDate: {date: {year: d.getFullYear(), month: d.getMonth() + 1, day: d.getDate()}}, dateRange: null};
}
Expand Down
Loading