Skip to content

Commit 8c983eb

Browse files
committed
Moved consumer README to dist file.
1 parent 38b98f6 commit 8c983eb

File tree

4 files changed

+157
-98
lines changed

4 files changed

+157
-98
lines changed

README.dist.md

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<p align="center">
2+
<a href="" rel="noopener">
3+
<img width=200px height=200px src="https://placehold.jp/000000/ffffff/200x200.png?text=Yourproject&css=%7B%22border-radius%22%3A%22%20100px%22%7D" alt="Yourproject logo"></a>
4+
</p>
5+
6+
<h1 align="center">yourproject</h1>
7+
8+
<div align="center">
9+
10+
[![GitHub Issues](https://img.shields.io/github/issues/AlexSkrypnyk/scaffold.svg)](https://github.com/AlexSkrypnyk/scaffold/issues)
11+
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/AlexSkrypnyk/scaffold.svg)](https://github.com/AlexSkrypnyk/scaffold/pulls)
12+
[![Test PHP](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-php.yml/badge.svg)](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-php.yml)
13+
[![Test Node.js](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-nodejs.yml/badge.svg)](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-nodejs.yml)
14+
[![Test Shell](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-shell.yml/badge.svg)](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-shell.yml)
15+
[![codecov](https://codecov.io/gh/AlexSkrypnyk/scaffold/graph/badge.svg?token=7WEB1IXBYT)](https://codecov.io/gh/AlexSkrypnyk/scaffold)
16+
![GitHub release (latest by date)](https://img.shields.io/github/v/release/AlexSkrypnyk/scaffold)
17+
![LICENSE](https://img.shields.io/github/license/AlexSkrypnyk/scaffold)
18+
![Renovate](https://img.shields.io/badge/renovate-enabled-green?logo=renovatebot)
19+
20+
</div>
21+
22+
---
23+
24+
<p align="center"> Few lines describing your project.
25+
<br>
26+
</p>
27+
28+
## Features
29+
30+
- Your first feature as a list item
31+
- Your second feature as a list item
32+
- Your third feature as a list item
33+
34+
## Installation
35+
36+
[//]: # (#;< PHP)
37+
38+
composer require yournamespace/yourproject
39+
40+
[//]: # (#;> PHP)
41+
42+
[//]: # (#;< NODEJS)
43+
44+
npm install @yournamespace/yourproject
45+
46+
[//]: # (#;> NODEJS)
47+
48+
[//]: # (#;< SHELL)
49+
50+
Download the latest release from GitHub releases page.
51+
52+
[//]: # (#;> SHELL)
53+
54+
## Usage
55+
56+
[//]: # (#;< PHP)
57+
58+
vendor/bin/yourproject
59+
60+
[//]: # (#;> PHP)
61+
62+
[//]: # (#;< NODEJS)
63+
64+
node_modules/.bin/yourproject
65+
66+
[//]: # (#;> NODEJS)
67+
68+
[//]: # (#;< SHELL)
69+
70+
./shell-command.sh
71+
72+
[//]: # (#;> SHELL)
73+
74+
## Maintenance
75+
76+
[//]: # (#;< PHP)
77+
78+
composer install
79+
composer lint
80+
composer test
81+
82+
[//]: # (#;> PHP)
83+
84+
[//]: # (#;< NODEJS)
85+
86+
npm install
87+
npm run lint
88+
npm run test
89+
90+
[//]: # (#;> NODEJS)
91+
92+
[//]: # (#;< SHELL)
93+
94+
shellcheck shell-command.sh tests/bats/*.bash tests/bats/*.bats
95+
shfmt -i 2 -ci -s -d shell-command.sh tests/bats/*.bash tests/bats/*.bats
96+
97+
npm ci --prefix tests/bats
98+
./tests/bats/node_modules/.bin/bats tests/bats
99+
100+
[//]: # (#;> SHELL)

README.md

+54-98
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,71 @@
1-
[//]: # (#;< META)
2-
3-
| <h1 align="center"> <img src="docs/assets/logo.png" alt="Scaffold logo" width=400px/></h1> **Generic project scaffold template** |
4-
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
5-
| <div align="center"> [![GitHub Issues](https://img.shields.io/github/issues/AlexSkrypnyk/scaffold.svg)](https://github.com/AlexSkrypnyk/scaffold/issues) [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/AlexSkrypnyk/scaffold.svg)](https://github.com/AlexSkrypnyk/scaffold/pulls) [![Scaffold test](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-scaffold.yml/badge.svg)](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-scaffold.yml) [![codecov](https://codecov.io/gh/AlexSkrypnyk/scaffold/graph/badge.svg?token=7WEB1IXBYT)](https://codecov.io/gh/AlexSkrypnyk/scaffold) ![Scaffold LICENSE](https://img.shields.io/github/license/AlexSkrypnyk/scaffold?label=Scaffold+license) ![GitHub Scaffold release (latest by date)](https://img.shields.io/github/v/release/AlexSkrypnyk/scaffold?label=Scaffold+release) ![Renovate](https://img.shields.io/badge/renovate-enabled-green?logo=renovatebot&label=Scaffold%20Renovate)</div> |
6-
| <div align="center"> 📘 [Scaffold documentation](https://getscaffold.dev) </div> |
7-
| **Features**<br/><br/>- **PHP**<br>&nbsp;&nbsp;&nbsp;&nbsp;- `composer.json` config<br>&nbsp;&nbsp;&nbsp;&nbsp;- Symfony CLI command app scaffold with unit tests (with coverage) and traits<br>&nbsp;&nbsp;&nbsp;&nbsp;- Simple single-file script scaffold with unit tests (with coverage) and traits<br>&nbsp;&nbsp;&nbsp;&nbsp;- Code quality tools with configurations: PHP Code Sniffer, PHP Mess Detector, PHPStan<br>- **NodeJS**<br>&nbsp;&nbsp;&nbsp;&nbsp;- `package.json` config<br>- **CI**<br>&nbsp;&nbsp;&nbsp;&nbsp;- Lint, test and publish PHP as PHAR<br>&nbsp;&nbsp;&nbsp;&nbsp;- Build and test for NodeJS<br>&nbsp;&nbsp;&nbsp;&nbsp;- Release drafter<br>&nbsp;&nbsp;&nbsp;&nbsp;- Release asset packaging and upload<br>&nbsp;&nbsp;&nbsp;&nbsp;- PR auto-assign<br>&nbsp;&nbsp;&nbsp;&nbsp;- Funding<br>- **Utility files**<br>&nbsp;&nbsp;&nbsp;&nbsp;- Readme with badges<br>&nbsp;&nbsp;&nbsp;&nbsp;- `.editorconfig`, `.gitignore`, `.gitattributes`<br>&nbsp;&nbsp;&nbsp;&nbsp;- Init shell script to chose features |
8-
| **How to use this scaffold repository**<br/><br/>1. Click on **Use this template** > **Create a new repository**<br>2. Checkout locally <br>3. Run `./init.sh` to replace `yournamespace`, `yourproject`, `Your Name` strings with your own and choose the features. <br/> ![init](docs/assets/init.gif) |
9-
| This table will be removed after running `./init.sh`. | The contents below will be a part of your repository. |
10-
11-
<br>
12-
13-
[//]: # (#;> META)
14-
15-
161
<p align="center">
17-
<a href="" rel="noopener">
18-
<img width=200px height=200px src="https://placehold.jp/000000/ffffff/200x200.png?text=Yourproject&css=%7B%22border-radius%22%3A%22%20100px%22%7D" alt="Yourproject logo"></a>
2+
<a href="" rel="noopener"><img src="docs/assets/logo.png" alt="Scaffold logo" width=400px/></a>
193
</p>
204

21-
<h1 align="center">yourproject</h1>
5+
<h1 align="center">Generic project scaffold template</h1>
226

237
<div align="center">
248

259
[![GitHub Issues](https://img.shields.io/github/issues/AlexSkrypnyk/scaffold.svg)](https://github.com/AlexSkrypnyk/scaffold/issues)
2610
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/AlexSkrypnyk/scaffold.svg)](https://github.com/AlexSkrypnyk/scaffold/pulls)
27-
[![Test PHP](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-php.yml/badge.svg)](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-php.yml)
28-
[![Test Node.js](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-nodejs.yml/badge.svg)](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-nodejs.yml)
29-
[![Test Shell](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-shell.yml/badge.svg)](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-shell.yml)
11+
[![Test](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-scaffold.yml/badge.svg)](https://github.com/AlexSkrypnyk/scaffold/actions/workflows/test-scaffold.yml)
3012
[![codecov](https://codecov.io/gh/AlexSkrypnyk/scaffold/graph/badge.svg?token=7WEB1IXBYT)](https://codecov.io/gh/AlexSkrypnyk/scaffold)
31-
![GitHub release (latest by date)](https://img.shields.io/github/v/release/AlexSkrypnyk/scaffold)
32-
![LICENSE](https://img.shields.io/github/license/AlexSkrypnyk/scaffold)
33-
![Renovate](https://img.shields.io/badge/renovate-enabled-green?logo=renovatebot)
13+
![LICENSE](https://img.shields.io/github/license/AlexSkrypnyk/scaffold?label=License)
14+
![Release (latest by date)](https://img.shields.io/github/v/release/AlexSkrypnyk/scaffold?label=Release)
15+
![Renovate](https://img.shields.io/badge/renovate-enabled-green?logo=renovatebot&label=Renovate)
3416

3517
</div>
3618

37-
---
38-
39-
<p align="center"> Few lines describing your project.
40-
<br>
41-
</p>
42-
43-
## Features
44-
45-
- Your first feature as a list item
46-
- Your second feature as a list item
47-
- Your third feature as a list item
48-
49-
## Installation
50-
51-
[//]: # (#;< PHP)
52-
53-
composer require yournamespace/yourproject
54-
55-
[//]: # (#;> PHP)
56-
57-
[//]: # (#;< NODEJS)
58-
59-
npm install @yournamespace/yourproject
60-
61-
[//]: # (#;> NODEJS)
62-
63-
[//]: # (#;< SHELL)
64-
65-
Download the latest release from GitHub releases page.
66-
67-
[//]: # (#;> SHELL)
68-
69-
## Usage
70-
71-
[//]: # (#;< PHP)
72-
73-
vendor/bin/yourproject
74-
75-
[//]: # (#;> PHP)
76-
77-
[//]: # (#;< NODEJS)
78-
79-
node_modules/.bin/yourproject
80-
81-
[//]: # (#;> NODEJS)
82-
83-
[//]: # (#;< SHELL)
84-
85-
./shell-command.sh
86-
87-
[//]: # (#;> SHELL)
88-
89-
## Maintenance
90-
91-
[//]: # (#;< PHP)
92-
93-
composer install
94-
composer lint
95-
composer test
96-
97-
[//]: # (#;> PHP)
98-
99-
[//]: # (#;< NODEJS)
100-
101-
npm install
102-
npm run lint
103-
npm run test
19+
<div align="center">
10420

105-
[//]: # (#;> NODEJS)
21+
📘 [Scaffold documentation](https://getscaffold.dev)
10622

107-
[//]: # (#;< SHELL)
23+
</div>
10824

109-
shellcheck shell-command.sh tests/bats/*.bash tests/bats/*.bats
110-
shfmt -i 2 -ci -s -d shell-command.sh tests/bats/*.bash tests/bats/*.bats
25+
## Features
11126

112-
npm ci --prefix tests/bats
113-
./tests/bats/node_modules/.bin/bats tests/bats
27+
- **Shell**
28+
- [Simple single-file script scaffold](shell-command.sh)
29+
with [BATS tests](tests/bats) (with coverage)
30+
- CI config to [Lint and test](.github/workflows/test-shell.yml) (with
31+
coverage)
32+
- **PHP**
33+
- [`composer.json`](composer.json)
34+
- [Symfony CLI command app scaffold](src/app.php)
35+
with [unit tests](tests/phpunit/Unit/Command) (with coverage)
36+
and [traits](tests/phpunit/Traits)
37+
- [Simple single-file script scaffold](php-script)
38+
with [unit tests](tests/phpunit/Functional) (with coverage)
39+
- Code quality tools with
40+
configurations: [PHP Code Sniffer](phpcs.xml), [PHP Mess Detector](phpmd.xml),
41+
[PHPStan](phpstan.neon), [Rector](rector.php)
42+
- CI config to [Lint, test](.github/workflows/test-php.yml)
43+
and [publish](.github/workflows/release-php.yml) PHP as [PHAR](box.json)
44+
- **NodeJS**
45+
- [`package.json`](package.json)
46+
- CI config to [build and test](.github/workflows/test-nodehs.yml) and test
47+
for NodeJS
48+
- **CI**
49+
- [Release drafter](.github/workflows/release-drafter.yml)
50+
- Release asset packaging and upload
51+
- [PR auto-assign](.github/workflows/assign-author.yml)
52+
- **Documentation**
53+
- [Readme with badges](README.dist.md)
54+
- [Scaffold](docs) for the documentation site
55+
using [Just the Docs theme](https://just-the-docs.com/)
56+
- [Terminalizer](assets/terminalizer.yml) configuration file
57+
- **Utility files**
58+
- [`.editorconfig`](.editorconfig), [`.gitignore`](.gitignore), [`.gitattributes`](.gitattributes)
59+
- [Renovate bot configuration](renovate.json)
60+
- [Pull request template](.github/PULL_REQUEST_TEMPLATE.md)
61+
- [Funding](.github/FUNDING.yml)
62+
- Init shell script to chose features
63+
64+
## How to use this scaffold repository
65+
66+
1. Click on **Use this template** > **Create a new repository**
67+
2. Checkout locally
68+
3. Run [`./init.sh`](init.sh) to replace `yournamespace`, `yourproject`,
69+
`Your Name` strings with your own and choose the features.<br/>
70+
![init](docs/assets/init.gif)
11471

115-
[//]: # (#;> SHELL)

init.sh

+2
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ main() {
413413
[ "${use_renovate}" != "y" ] && remove_renovate
414414
[ "${use_docs}" != "y" ] && remove_docs
415415

416+
mv README.dist.md "README.md" >/dev/null 2>&1 || true
417+
416418
process_internal "${namespace}" "${project}" "${author}"
417419

418420
[ "${remove_self}" != "n" ] && rm -- "$0" || true

tests/scaffold/_assert_init.bash

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ assert_files_present_common() {
1515
assert_file_contains ".gitignore" "/.build"
1616
assert_file_not_contains ".gitignore" "/coverage"
1717
assert_file_exists "README.md"
18+
assert_file_not_exists "README.dist.md"
1819

1920
assert_file_not_exists "LICENSE"
2021
assert_file_not_exists ".github/workflows/test-scaffold.yml"

0 commit comments

Comments
 (0)