Skip to content

Commit

Permalink
[Release] v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ptkdev committed Mar 30, 2021
1 parent ffcc324 commit 4fb0057
Show file tree
Hide file tree
Showing 7 changed files with 21,872 additions and 5,840 deletions.
28 changes: 18 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
# v1.3.0 (March 30, 2021)

- Feature: support more than 1 levels deep of json, example: {{node.version}}

[![](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)

# v1.2.0 (May 18, 2020)
* Support: github action (#1)

[![](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)
- Support: github action (#1)

# v1.1.0 (May 16, 2020)
* Support: fury.io
* Support: snyk.io
* Support: badgen.net
* Fix: Replace "space" with `%20`
* Fix: Replace `-` with `--`
* Feature: `custom` attribute. Now you can set any badge string on image url of badge services.

- Support: fury.io
- Support: snyk.io
- Support: badgen.net
- Fix: Replace "space" with `%20`
- Fix: Replace `-` with `--`
- Feature: `custom` attribute. Now you can set any badge string on image url of badge services.

# v1.0.1 (May 16, 2020)
* Docs: 🔑 Liquid variables

- Docs: 🔑 Liquid variables

# v1.0.0 (May 15, 2020)
* First Release.

- First Release.
149 changes: 84 additions & 65 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions cli/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
*
*/
const fs = require("fs");
const nunjucks = require("nunjucks");
const logger = new (require("@ptkdev/logger"))();
const jtr = new (require("@ptkdev/json-token-replace"))();
var pkg = {}, rc = {files: []}, errors = 0;

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

let json = jtr.replace(pkg, rc);
let json = JSON.parse(nunjucks.renderString(rc.toString(), pkg));
for (let j = 0; j < json.files.length; j++) {
fs.readFile(json.files[j], "utf8", (err, markdown) => {
if (err) {
Expand Down
8 changes: 4 additions & 4 deletions examples/.all-shieldsrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"url": "https://www.npmjs.com/package/@ptkdev/all-shields-cli",
"color": "#c0392b",
"label": "version",
"title": "npm version",
"message": "current: {{version}}",
"title": "node version",
"message": "v{{node.version}}",
"style": "flat",
"logo": "npm",
"logo": "node",
"platform": "shields"
},
{
Expand Down Expand Up @@ -158,4 +158,4 @@
]
}
]
}
}
7 changes: 5 additions & 2 deletions examples/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"name": "all-shields-cli-examples",
"description": "Examples of all-shields-cli usage",
"version": "1.0.0"
}
"version": "1.0.0",
"node": {
"version": "12.0.0"
}
}
Loading

1 comment on commit 4fb0057

@743v45
Copy link

@743v45 743v45 commented on 4fb0057 Mar 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What an elegant solution! thank you! 🎉

Please sign in to comment.