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

Commit

Permalink
Merge 0d2cfab into 2691334
Browse files Browse the repository at this point in the history
  • Loading branch information
MarsiBarsi committed Feb 4, 2020
2 parents 2691334 + 0d2cfab commit 3a3cd05
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Expand Up @@ -10,7 +10,3 @@ All notable changes to this project will be documented in this file. See [standa
- **payment-request:** `PaymentRequestService` add ([4c14da3](https://github.com/ng-web-apis/payment-request/commit/4c14da3))
- **tokens:** add payment methods and payment options ([aeb474d](https://github.com/ng-web-apis/payment-request/commit/aeb474d))
- **tokens:** add support token ([9014a33](https://github.com/ng-web-apis/payment-request/commit/9014a33))

# Changelog

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.
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
# ![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
# ![ng-web-apis logo](projects/demo/src/assets/logo.svg) Payment Request API for Angular

> Part of <img src="projects/demo/src/assets/web-api.svg" align="top"> [Web APIs for Angular](https://ng-web-apis.github.io/)
Expand Down
9 changes: 4 additions & 5 deletions projects/payment-request/package.json
Expand Up @@ -4,7 +4,8 @@
"peerDependencies": {
"@angular/common": ">=6.0.0",
"@angular/core": ">=6.0.0",
"@ng-web-apis/common": ">=1.0.0"
"@ng-web-apis/common": ">=1.0.0",
"rxjs": ">=6.0.0"
},
"description": "This is a library for declarative use of Payment Request API with Angular",
"keywords": [
Expand All @@ -23,10 +24,8 @@
"email": "79601794011@ya.ru",
"url": "http://marsibarsi.me/"
},
"contributors": [
"Alex Inkin <alexander@inkin.ru>"
],
"contributors": ["Alex Inkin <alexander@inkin.ru>"],
"repository": "https://github.com/ng-web-apis/payment-request",
"bugs": "https://github.com/ng-web-apis/payment-request/issues",
"homepage": "https://github.com/ng-web-apis/payment-request#README"
}
}
9 changes: 4 additions & 5 deletions scripts/postbuild.js
Expand Up @@ -2,14 +2,13 @@ const fs = require('fs');

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

copyExtraFiles();

function copyExtraFiles() {
if (
!fs.existsSync(README_PATH)
) {
if (!fs.existsSync(README_PATH)) {
throw new Error('Requested files do not exit');
} else {
copyReadmeIntoDistFolder(README_PATH, PATH_TO_README);
Expand All @@ -19,8 +18,8 @@ function copyExtraFiles() {
function copyReadmeIntoDistFolder(srcPath, toPath) {
const fileBody = fs.readFileSync(srcPath).toString();
const withoutLogos = fileBody
.replace('![ng-web-apis logo](assets/payment-request.svg) ', '')
.replace('<img src="assets/web-api.svg" align="top"> ', '');
.replace(`![ng-web-apis logo](${ASSETS_PATH}/logo.svg) `, '')
.replace(`<img src="${ASSETS_PATH}/web-api.svg" align="top"> `, '');

fs.writeFileSync(toPath, withoutLogos);
}

0 comments on commit 3a3cd05

Please sign in to comment.