Skip to content

Commit

Permalink
Merge pull request #217 from maxisam/release/13.0.0
Browse files Browse the repository at this point in the history
Release/13.0.0
  • Loading branch information
maxisam authored Feb 21, 2020
2 parents f87d22c + 77ea8a6 commit d46bd25
Show file tree
Hide file tree
Showing 15 changed files with 4,398 additions and 2,725 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ To make more sense with the future versioning scheme of Angular, the directive s
If you need to use it on 2.x, please use version 7.x.x.
If you need to use it on 4.x, please use version 8.x.x.
If you need to use it on 5.x, please use version 10.x.x.
If you need to use it on 9.x, please use version 13.x.x.

The code are pretty much the same, in 8.0.0 it uses InjectionToken which requires angular4 and above.

Expand Down Expand Up @@ -170,10 +171,8 @@ Special thanks to [@DmitryEfimenko](https://github.com/DmitryEfimenko) for imple

## Build project

```
1. npm i
2. npm run build
```cmd
npm i && npm run build
```

To run demo code locally
Expand Down
17 changes: 13 additions & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/library-host",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": [
"node_modules/@clr/ui/clr-ui.min.css",
Expand All @@ -28,6 +29,12 @@
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand Down Expand Up @@ -68,7 +75,7 @@
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": ["src/styles.css"],
"scripts": [],
Expand Down Expand Up @@ -118,7 +125,8 @@
},
"configurations": {
"production": {
"project": "projects/ngx-clipboard/ng-package.prod.json"
"project": "projects/ngx-clipboard/ng-package.prod.json",
"tsConfig": "projects/ngx-clipboard/tsconfig.lib.prod.json"
}
}
},
Expand All @@ -145,6 +153,7 @@
},
"defaultProject": "library-host",
"cli": {
"packageManager": "yarn"
"packageManager": "yarn",
"analytics": "26cce57c-232f-4bfb-ac75-bfc72a238bd7"
}
}
File renamed without changes.
52 changes: 25 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.15",
"@angular/common": "~7.2.15",
"@angular/compiler": "~7.2.15",
"@angular/core": "~7.2.15",
"@angular/forms": "~7.2.15",
"@angular/platform-browser": "~7.2.15",
"@angular/platform-browser-dynamic": "~7.2.15",
"@angular/router": "~7.2.15",
"@clr/angular": "^0.13.6",
"@clr/icons": "^0.13.6",
"@clr/ui": "^0.13.6",
"@angular/animations": "~9.0.1",
"@angular/common": "~9.0.1",
"@angular/compiler": "~9.0.0",
"@angular/core": "~9.0.1",
"@angular/forms": "~9.0.1",
"@angular/platform-browser": "~9.0.1",
"@angular/platform-browser-dynamic": "~9.0.1",
"@angular/router": "~9.0.1",
"@clr/angular": "^2.3.7",
"@clr/icons": "^2.3.7",
"@clr/ui": "^2.3.7",
"core-js": "^2.5.4",
"ngx-clipboard": "12.3.0",
"ngx-window-token": "2.0.1",
"rxjs": "~6.5.2",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
"ngx-clipboard": "13.0.0-beta06",
"ngx-window-token": "3.0.0-beta01",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.9",
"@angular-devkit/build-ng-packagr": "~0.13.9",
"@angular/cli": "~7.3.9",
"@angular/compiler-cli": "~7.2.15",
"@angular/language-service": "~7.2.15",
"@angular-devkit/build-angular": "~0.900.2",
"@angular-devkit/build-ng-packagr": "~0.900.2",
"@angular/cli": "~9.0.2",
"@angular/compiler-cli": "~9.0.1",
"@angular/language-service": "~9.0.1",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"@types/node": "^12.11.1",
"@webcomponents/custom-elements": "^1.2.1",
"codelyzer": "~4.5.0",
"codelyzer": "^5.1.2",
"cpx": "^1.5.0",
"husky": "2.4.1",
"jasmine-core": "~2.99.1",
Expand All @@ -56,15 +56,13 @@
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"lint-staged": "8.2.1",
"ng-packagr": "^4.2.0",
"ng-packagr": "^9.0.0",
"prettier": "1.18.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tsickle": ">=0.34.0",
"tslib": "^1.9.0",
"tslint": "~5.11.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "~3.2.4"
"typescript": "^3.7.5"
},
"husky": {
"hooks": {
Expand Down
8 changes: 4 additions & 4 deletions projects/ngx-clipboard/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ngx-clipboard",
"description": "angular 2 clipboard",
"version": "12.3.1",
"version": "13.0.0",
"author": {
"name": "Sam Lin",
"email": "maxisam@gmail.com"
Expand All @@ -22,10 +22,10 @@
"copy"
],
"dependencies": {
"ngx-window-token": "^2.0.0"
"ngx-window-token": ">= 3.0.0-beta01 || >= 3.0.0"
},
"peerDependencies": {
"@angular/common": ">=6.0.0",
"@angular/core": ">=6.0.0"
"@angular/common": ">=9.0.0",
"@angular/core": ">=9.0.0"
}
}
14 changes: 2 additions & 12 deletions projects/ngx-clipboard/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,15 @@
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"target": "es2015",
"module": "es2015",
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
6 changes: 6 additions & 0 deletions projects/ngx-clipboard/tsconfig.lib.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.lib.json",
"angularCompilerOptions": {
"enableIvy": false
}
}
21 changes: 5 additions & 16 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,15 @@
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
* Learn more in https://angular.io/guide/browser-support
*/
import 'core-js/es6/array';
import 'core-js/es6/date';
import 'core-js/es6/function';
import 'core-js/es6/map';
import 'core-js/es6/math';
import 'core-js/es6/number';
import 'core-js/es6/object';
import 'core-js/es6/parse-float';
import 'core-js/es6/parse-int';
import 'core-js/es6/reflect';
import 'core-js/es6/regexp';
import 'core-js/es6/set';
import 'core-js/es6/string';
import 'core-js/es6/symbol';
import 'core-js/es6/weak-map';

import 'zone.js/dist/zone';

/***************************************************************************************************
* BROWSER POLYFILLS
*/

/***************************************************************************************************
* BROWSER POLYFILLS
*/
Expand Down
9 changes: 0 additions & 9 deletions src/tsconfig.app.json

This file was deleted.

10 changes: 0 additions & 10 deletions src/tsconfig.spec.json

This file was deleted.

9 changes: 9 additions & 0 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.d.ts"]
}
14 changes: 10 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"downlevelIteration": true,
"experimentalDecorators": true,
"target": "es5",
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": ["node_modules/@types"],
"lib": ["es2017", "dom"],
"lib": ["es2018", "dom"],
"paths": {
"local-ngx-clipboard": ["dist/lib"]
}
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
9 changes: 9 additions & 0 deletions tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": ["jasmine", "node"]
},
"files": ["src/test.ts", "src/polyfills.ts"],
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
}
10 changes: 5 additions & 5 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"component-selector": [true, ["element", "attribute"], [], "kebab-case"],
"component-class-suffix": true,
"directive-class-suffix": true,
"no-attribute-parameter-decorator": true,
"no-attribute-decorator": true,
"no-forward-ref": false,
"no-input-rename": true,
"no-output-rename": true,
"pipe-naming": [true, "camelCase", "mpix"],
"use-host-property-decorator": false,
"use-input-property-decorator": true,
"use-life-cycle-interface": true,
"use-output-property-decorator": true,
"no-host-metadata-property": false,
"no-inputs-metadata-property": true,
"use-lifecycle-interface": true,
"no-outputs-metadata-property": true,
"use-pipe-transform-interface": true,
"ordered-imports": [false],
"variable-name": [true, "allow-leading-underscore", "allow-pascal-case", "ban-keywords", "check-format"],
Expand Down
Loading

0 comments on commit d46bd25

Please sign in to comment.