chore(readme): add apps count
This commit is contained in:
parent
373c91a7f4
commit
143e59ca36
7
.github/scripts/readme-generator.ts
vendored
7
.github/scripts/readme-generator.ts
vendored
|
@ -43,12 +43,13 @@ const appToReadme = async (app: App) => {
|
|||
return `| <img src="apps/${app.id}/metadata/logo.jpg" style="border-radius: 10px;" height="auto" width=50> | [${app.name}](${app.source}) | ${app.description} | ${app.port} |`;
|
||||
};
|
||||
|
||||
const writeToReadme = (appsList: string) => {
|
||||
const writeToReadme = (appsList: string, count: number) => {
|
||||
const baseReadme = fs.readFileSync(
|
||||
__dirname + "/../../templates/README.md",
|
||||
"utf8"
|
||||
);
|
||||
const finalReadme = baseReadme.replace("<!appsList>", appsList);
|
||||
let finalReadme = baseReadme.replace("<!appsList>", appsList);
|
||||
finalReadme = finalReadme.replace("<!appsCount>", count.toString());
|
||||
fs.writeFileSync(__dirname + "/../../README.md", finalReadme);
|
||||
};
|
||||
|
||||
|
@ -62,7 +63,7 @@ const main = async () => {
|
|||
appsList = appsList + (appFinal + "\n");
|
||||
}
|
||||
|
||||
writeToReadme(appsList);
|
||||
writeToReadme(appsList, appKeys.length);
|
||||
exec(
|
||||
`npx prettier ${__dirname + "/../../README.md"} --write`,
|
||||
(stdout, stderr) => {
|
||||
|
|
|
@ -10,7 +10,7 @@ If you want to see new apps on Tipi you can either:
|
|||
- [Join the Discord](https://discord.gg/Bu9qEPnHsc) members of the community will add it.
|
||||
- Fork this repo and create the necessary files for a Tipi app. Follow this [guide](https://www.runtipi.io/docs/contributing/adding-a-new-app)`
|
||||
|
||||
## Apps available
|
||||
## Apps available (<!appsCount>)
|
||||
|
||||
| Icon | Name | Description | Port |
|
||||
| ---- | ---- | ----------- | ---- |
|
||||
|
|
Loading…
Reference in New Issue
Block a user