Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

Commit f24368d

Browse files
authored
fix(library-package-json): add rxjs as a peer dependancy (#8)
1 parent 2691334 commit f24368d

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,3 @@ All notable changes to this project will be documented in this file. See [standa
1010
- **payment-request:** `PaymentRequestService` add ([4c14da3](https://github.com/ng-web-apis/payment-request/commit/4c14da3))
1111
- **tokens:** add payment methods and payment options ([aeb474d](https://github.com/ng-web-apis/payment-request/commit/aeb474d))
1212
- **tokens:** add support token ([9014a33](https://github.com/ng-web-apis/payment-request/commit/9014a33))
13-
14-
# Changelog
15-
16-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ![ng-web-apis logo](https://github.com/ng-web-apis/payment-request/blob/master/projects/demo/src/assets/logo.svg) Payment Request API for Angular
1+
# ![ng-web-apis logo](projects/demo/src/assets/logo.svg) Payment Request API for Angular
22

33
> Part of <img src="projects/demo/src/assets/web-api.svg" align="top"> [Web APIs for Angular](https://ng-web-apis.github.io/)
44

projects/payment-request/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"peerDependencies": {
55
"@angular/common": ">=6.0.0",
66
"@angular/core": ">=6.0.0",
7-
"@ng-web-apis/common": ">=1.0.0"
7+
"@ng-web-apis/common": ">=1.0.0",
8+
"rxjs": ">=6.0.0"
89
},
910
"description": "This is a library for declarative use of Payment Request API with Angular",
1011
"keywords": [
@@ -23,10 +24,8 @@
2324
"email": "[email protected]",
2425
"url": "http://marsibarsi.me/"
2526
},
26-
"contributors": [
27-
"Alex Inkin <[email protected]>"
28-
],
27+
"contributors": ["Alex Inkin <[email protected]>"],
2928
"repository": "https://github.com/ng-web-apis/payment-request",
3029
"bugs": "https://github.com/ng-web-apis/payment-request/issues",
3130
"homepage": "https://github.com/ng-web-apis/payment-request#README"
32-
}
31+
}

scripts/postbuild.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ const fs = require('fs');
22

33
const DIST_LIB_PATH = 'dist/payment-request/';
44
const README_PATH = 'README.md';
5+
const ASSETS_PATH = 'projects/demo/src/assets';
56
const PATH_TO_README = DIST_LIB_PATH + README_PATH;
67

78
copyExtraFiles();
89

910
function copyExtraFiles() {
10-
if (
11-
!fs.existsSync(README_PATH)
12-
) {
11+
if (!fs.existsSync(README_PATH)) {
1312
throw new Error('Requested files do not exit');
1413
} else {
1514
copyReadmeIntoDistFolder(README_PATH, PATH_TO_README);
@@ -19,8 +18,8 @@ function copyExtraFiles() {
1918
function copyReadmeIntoDistFolder(srcPath, toPath) {
2019
const fileBody = fs.readFileSync(srcPath).toString();
2120
const withoutLogos = fileBody
22-
.replace('![ng-web-apis logo](assets/payment-request.svg) ', '')
23-
.replace('<img src="assets/web-api.svg" align="top"> ', '');
21+
.replace(`![ng-web-apis logo](${ASSETS_PATH}/logo.svg) `, '')
22+
.replace(`<img src="${ASSETS_PATH}/web-api.svg" align="top"> `, '');
2423

2524
fs.writeFileSync(toPath, withoutLogos);
2625
}

0 commit comments

Comments
 (0)