Skip to content

Commit 676f964

Browse files
author
Evgeny Zakharov
committed
docs(repo): add better template info
1 parent a852792 commit 676f964

File tree

1 file changed

+49
-41
lines changed

1 file changed

+49
-41
lines changed

README.md

Lines changed: 49 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,49 @@
2121
</a>
2222
</p>
2323

24+
## Template Features
25+
26+
- 🚀 Blazingly fast and easy installation
27+
- 💡 CI workflows configured for changelogs and release/prerelease cycles
28+
- 🧱 Perfect and easy-to-support tooling setup without any conflicts with CI environment
29+
- 📚 Well-documented conventions for project maintaining (commits, pull-requests, branches)
30+
31+
## Using template
32+
33+
### 1. Replace everything
34+
35+
1. Replace all `@js-templates/typescript-library` entries with your library name
36+
2. Replace all `js-templates/typescript-library` entries with your repo path
37+
3. Replace all `Your Library Description` entries with your library description
38+
4. Replace all `Your Name` entries with your library name
39+
5. Update `logo.svg`
40+
6. Update logo's `alt`
41+
42+
### 2. Add secrets
43+
44+
- `NPM_TOKEN`
45+
- `FULL_ACCESS_GITHUB_TOKEN` if you plan to set up [the branch protection](#add-branch-protection)
46+
47+
### 3. (optional) Set up branch protection
48+
49+
1. Go to `Settings` > `Branches` > `Add rule`
50+
2. Specify `main` branch
51+
3. Enable the following options:
52+
- Require a pull request before merging (without approvals)
53+
- Require status checks to pass before merging (you need to run them at least once to appear):
54+
- `test-and-build`
55+
- `pr-labeler`
56+
- Include administrators
57+
- Allow force pushes
58+
4. Repeat, but using `release/*` instead of `main`
59+
5. [Create a new Personal Access Token](https://github.com/settings/tokens/new) with `repo` permissions
60+
6. Use it as a new Secret named `FULL_ACCESS_GITHUB_TOKEN`
61+
It's needed to bypass the branch protection on CI runs
62+
63+
### 4. The last step
64+
65+
Remove **Template Features** and **Using Template** sections from README (don't forget about Navigation links)
66+
2467
## Before you start
2568

2669
The README on `main` branch may contain some unreleased changes.
@@ -29,17 +72,18 @@ Go to [`release/latest`](https://github.com/js-templates/typescript-library/tree
2972

3073
## Navigation
3174

75+
- [Template Features](#template-features)
76+
- [Using template](#using-template)
77+
- [Replace everything](#replace-everything)
78+
- [Add secrets](#add-secrets)
79+
- [Set up branch protection](#set-up-branch-protection)
80+
- [The last step](#the-last-step)
3281
- [Installation](#installation)
3382
- [Contrubuting](#contributing)
3483
- [Maintenance](#maintenance)
3584
- [Regular flow](#regular-flow)
3685
- [Prerelease from](#prerelease-flow)
3786
- [Conventions](#conventions)
38-
- [Using template](#using-template)
39-
- [Replace everything](#replace-everything)
40-
- [Add secrets](#add-secrets)
41-
- [Set up branch protection](#set-up-branch-protection)
42-
- [The last step](#the-last-step)
4387

4488
## Installation
4589

@@ -117,39 +161,3 @@ Then, the `release` workflow handles everything:
117161
- Should have human-readable name, for example: "Add a TODO list feature"
118162
- Should describe changes
119163
- Should have correct labels
120-
121-
## Using template
122-
123-
### Replace everything
124-
125-
1. Replace all `@js-templates/typescript-library` entries with your library name
126-
2. Replace all `js-templates/typescript-library` entries with your repo path
127-
3. Replace all `Your Library Description` entries with your library description
128-
4. Replace all `Your Name` entries with your library name
129-
5. Update `logo.svg`
130-
6. Update logo's `alt`
131-
132-
### Add secrets
133-
134-
- `NPM_TOKEN`
135-
- `FULL_ACCESS_GITHUB_TOKEN` if you plan to set up [the branch protection](#add-branch-protection)
136-
137-
### Set up branch protection
138-
139-
1. Go to `Settings` > `Branches` > `Add rule`
140-
2. Specify `main` branch
141-
3. Enable the following options:
142-
- Require a pull request before merging (without approvals)
143-
- Require status checks to pass before merging (you need to run them at least once to appear):
144-
- `test-and-build`
145-
- `pr-labeler`
146-
- Include administrators
147-
- Allow force pushes
148-
4. Repeat, but using `release/*` instead of `main`
149-
5. [Create a new Personal Access Token](https://github.com/settings/tokens/new) with `repo` permissions
150-
6. Use it as a new Secret named `FULL_ACCESS_GITHUB_TOKEN`
151-
It's needed to bypass the branch protection on CI runs
152-
153-
### The last step
154-
155-
Remove **Using Template** section from README (don't forget about Navigation links)

0 commit comments

Comments
 (0)