Skip to content

Commit 4fb0057

Browse files
committed
[Release] v1.3.0
1 parent ffcc324 commit 4fb0057

File tree

7 files changed

+21872
-5840
lines changed

7 files changed

+21872
-5840
lines changed

CHANGELOG.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1+
# v1.3.0 (March 30, 2021)
2+
3+
- Feature: support more than 1 levels deep of json, example: {{node.version}}
4+
5+
[![](https://img.shields.io/badge/donate-paypal-005EA6.svg?logo=paypal)](https://www.paypal.me/ptkdev) [![](https://img.shields.io/badge/donate-patreon-F87668.svg?logo=patreon)](https://www.patreon.com/ptkdev) [![](https://img.shields.io/badge/donate-sponsors-ea4aaa.svg?logo=github)](https://github.com/sponsors/ptkdev/) [![](https://img.shields.io/badge/donate-ko--fi-29abe0.svg?logo=ko-fi)](https://ko-fi.com/ptkdev)
6+
17
# v1.2.0 (May 18, 2020)
2-
* Support: github action (#1)
38

4-
[![](https://img.shields.io/badge/donate-paypal-005EA6.svg?logo=paypal)](https://www.paypal.me/ptkdev) [![](https://img.shields.io/badge/donate-patreon-F87668.svg?logo=patreon)](https://www.patreon.com/ptkdev) [![](https://img.shields.io/badge/donate-sponsors-ea4aaa.svg?logo=github)](https://github.com/sponsors/ptkdev/) [![](https://img.shields.io/badge/donate-ko--fi-29abe0.svg?logo=ko-fi)](https://ko-fi.com/ptkdev)
9+
- Support: github action (#1)
510

611
# v1.1.0 (May 16, 2020)
7-
* Support: fury.io
8-
* Support: snyk.io
9-
* Support: badgen.net
10-
* Fix: Replace "space" with `%20`
11-
* Fix: Replace `-` with `--`
12-
* Feature: `custom` attribute. Now you can set any badge string on image url of badge services.
12+
13+
- Support: fury.io
14+
- Support: snyk.io
15+
- Support: badgen.net
16+
- Fix: Replace "space" with `%20`
17+
- Fix: Replace `-` with `--`
18+
- Feature: `custom` attribute. Now you can set any badge string on image url of badge services.
1319

1420
# v1.0.1 (May 16, 2020)
15-
* Docs: 🔑 Liquid variables
21+
22+
- Docs: 🔑 Liquid variables
1623

1724
# v1.0.0 (May 15, 2020)
18-
* First Release.
25+
26+
- First Release.

README.md

Lines changed: 84 additions & 65 deletions
Large diffs are not rendered by default.

cli/generate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
*
1111
*/
1212
const fs = require("fs");
13+
const nunjucks = require("nunjucks");
1314
const logger = new (require("@ptkdev/logger"))();
14-
const jtr = new (require("@ptkdev/json-token-replace"))();
1515
var pkg = {}, rc = {files: []}, errors = 0;
1616

1717
try {
1818
pkg = JSON.parse(fs.readFileSync(`${process.cwd()}/package.json`));
19-
rc = JSON.parse(fs.readFileSync(`${process.cwd()}/.all-shieldsrc`));
19+
rc = fs.readFileSync(`${process.cwd()}/.all-shieldsrc`);
2020
} catch (err) {
2121
logger.error(err, "import files");
2222
errors++;
2323
}
2424

25-
let json = jtr.replace(pkg, rc);
25+
let json = JSON.parse(nunjucks.renderString(rc.toString(), pkg));
2626
for (let j = 0; j < json.files.length; j++) {
2727
fs.readFile(json.files[j], "utf8", (err, markdown) => {
2828
if (err) {

examples/.all-shieldsrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"url": "https://www.npmjs.com/package/@ptkdev/all-shields-cli",
2121
"color": "#c0392b",
2222
"label": "version",
23-
"title": "npm version",
24-
"message": "current: {{version}}",
23+
"title": "node version",
24+
"message": "v{{node.version}}",
2525
"style": "flat",
26-
"logo": "npm",
26+
"logo": "node",
2727
"platform": "shields"
2828
},
2929
{
@@ -158,4 +158,4 @@
158158
]
159159
}
160160
]
161-
}
161+
}

examples/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"name": "all-shields-cli-examples",
33
"description": "Examples of all-shields-cli usage",
4-
"version": "1.0.0"
5-
}
4+
"version": "1.0.0",
5+
"node": {
6+
"version": "12.0.0"
7+
}
8+
}

0 commit comments

Comments
 (0)