Skip to content

Commit

Permalink
feat(package): add Angualr 12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
DethAriel committed May 14, 2021
1 parent b0f5544 commit 6c7a49f
Show file tree
Hide file tree
Showing 9 changed files with 2,846 additions and 4,026 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## Running demo

In order to run the demo you need to `yarn demo`. Then the demo site will be served at http://localhost:4200/ng-recaptcha/.
In order to run the demo you need to `yarn demo:serve`. Then the demo site will be served at http://localhost:4200/ng-recaptcha/.

## Maintainer notes

Expand Down
9 changes: 7 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,18 @@
"polyfills": "projects/demo/src/polyfills.ts",
"tsConfig": "projects/demo/tsconfig.app.json",
"baseHref": "/ng-recaptcha/",
"aot": true,
"assets": [
"projects/demo/src/favicon.ico",
"projects/demo/src/images"
],
"styles": ["projects/demo/src/styles.css"],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand Down
42 changes: 20 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"github-release": "conventional-github-releaser --preset angular",
"lib:build": "ng build ng-recaptcha --prod",
"prepare-release": "npm whoami && yarn lib:build && npm version $1",
"version": "yarn changelog && git add CHANGELOG.md && yarn demo:build && git add demo/yarn.lock",
"version": "yarn changelog && git add CHANGELOG.md && yarn demo:build",
"lint": "eslint projects --ext .js,.ts,.html"
},
"husky": {
Expand All @@ -26,28 +26,26 @@
},
"dependencies": {
"@types/grecaptcha": "^3.0.1",
"tslib": "^2.0.0"
},
"peerDependencies": {
"@angular/core": "^11.0.0"
"tslib": "^2.2.0"
},
"peerDependencies": {},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1100.5",
"@angular-devkit/build-angular": "~12.0.0",
"@angular-eslint/eslint-plugin": "^0.8.0-beta.3",
"@angular-eslint/eslint-plugin-template": "^0.8.0-beta.3",
"@angular-eslint/template-parser": "^0.8.0-beta.3",
"@angular/animations": "^11.0.5",
"@angular/cdk": "^11.0.3",
"@angular/cli": "^11.0.5",
"@angular/common": "^11.0.2",
"@angular/compiler": "^11.0.2",
"@angular/compiler-cli": "^11.0.2",
"@angular/core": "^11.0.2",
"@angular/forms": "^11.0.2",
"@angular/material": "^11.0.3",
"@angular/platform-browser": "^11.0.2",
"@angular/platform-browser-dynamic": "^11.0.5",
"@angular/router": "^11.0.5",
"@angular/animations": "^12.0.0",
"@angular/cdk": "^12.0.0",
"@angular/cli": "^12.0.0",
"@angular/common": "^12.0.0",
"@angular/compiler": "^12.0.0",
"@angular/compiler-cli": "^12.0.0",
"@angular/core": "^12.0.0",
"@angular/forms": "^12.0.0",
"@angular/material": "^12.0.0",
"@angular/platform-browser": "^12.0.0",
"@angular/platform-browser-dynamic": "^12.0.0",
"@angular/router": "^12.0.0",
"@types/core-js": "^0.9.39",
"@types/jasmine": "^3.6.2",
"@types/query-string": "^6.3.0",
Expand All @@ -68,20 +66,20 @@
"husky": "^4.3.0",
"jasmine-core": "^3.6.0",
"jasmine-spec-reporter": "^5.0.0",
"karma": "^5.2.3",
"karma": "^6.3.2",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.0.3",
"karma-jasmine": "^4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"lint-staged": "^10.5.2",
"ng-packagr": "^11.0.3",
"ng-packagr": "^12.0.0",
"npm-run-all": "^4.1.2",
"prettier": "^2.2.1",
"protractor": "^7.0.0",
"rimraf": "^3.0.2",
"rxjs": "^6.5.3",
"ts-node": "^9.1.1",
"typescript": "~4.0.0",
"zone.js": "~0.10.3"
"typescript": "~4.2.4",
"zone.js": "~0.11.4"
}
}
4 changes: 2 additions & 2 deletions projects/demo/bin/file-gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function writeExampleFile(
fileName
);

fs.writeFileSync(location, contents, { encoding: "UTF8" });
fs.writeFileSync(location, contents, { encoding: "utf-8" });
}

function highlightRequire(file: string, lang: string) {
Expand Down Expand Up @@ -95,7 +95,7 @@ function generateLinks() {
];
`;

fs.writeFileSync(location, contents, { encoding: "UTF8" });
fs.writeFileSync(location, contents, { encoding: "utf-8" });
}

function generateFiles() {
Expand Down
2 changes: 1 addition & 1 deletion projects/demo/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
2 changes: 1 addition & 1 deletion projects/demo/src/polyfills.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import "zone.js/dist/zone";
import "zone.js";
2 changes: 1 addition & 1 deletion projects/ng-recaptcha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ng-recaptcha"
],
"peerDependencies": {
"@angular/core": "^11.0.0"
"@angular/core": "^12.0.0"
},
"dependencies": {
"@types/grecaptcha": "^3.0.1",
Expand Down
4 changes: 2 additions & 2 deletions projects/ng-recaptcha/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import "zone.js/dist/zone";
import "zone.js/dist/zone-testing";
import "zone.js";
import "zone.js/testing";
import { getTestBed } from "@angular/core/testing";
import {
BrowserDynamicTestingModule,
Expand Down
Loading

0 comments on commit 6c7a49f

Please sign in to comment.