create-typescript-app 2.71.0 → 2.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -49,7 +49,8 @@ You can read more about `create-typescript-app` and the tooling it supports:
|
|
|
49
49
|
|
|
50
50
|
1. [**Blocks**](./docs/Blocks.md): a breakdown of all the pieces this template can set up.
|
|
51
51
|
2. [**CLI**](./docs/CLI.md): providing granular options to customize how the template is run.
|
|
52
|
-
3. [**
|
|
52
|
+
3. [**Examples**](./docs/Examples.md): kinds of projects this template can create, with example repositories
|
|
53
|
+
4. [**FAQs**](./docs/FAQs.md): frequently asked questions and troubleshooting
|
|
53
54
|
|
|
54
55
|
> [!NOTE]
|
|
55
56
|
> This template is opinionated and not endorsed by the TypeScript team.
|
|
@@ -28,6 +28,7 @@ const blockREADME = base.createBlock({
|
|
|
28
28
|
align: "right",
|
|
29
29
|
...options.logo
|
|
30
30
|
})}>\n`;
|
|
31
|
+
const usage = options.documentation.readme.usage ?? ["## Usage", ...defaultUsage].join("\n\n");
|
|
31
32
|
const suffixes = [...notices, options.documentation.readme.footnotes].filter((suffix) => typeof suffix === "string");
|
|
32
33
|
return { files: { "README.md": `<h1 align="center">${options.title}</h1>
|
|
33
34
|
|
|
@@ -37,11 +38,7 @@ const blockREADME = base.createBlock({
|
|
|
37
38
|
${formatBadges(badges)}
|
|
38
39
|
</p>
|
|
39
40
|
${[logo, explainer].filter(Boolean).join("")}
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
${options.documentation.readme.usage ?? defaultUsage.join("\n\n")}
|
|
43
|
-
|
|
44
|
-
## Development
|
|
41
|
+
${usage ? `${usage}\n\n` : ""}## Development
|
|
45
42
|
|
|
46
43
|
See [\`.github/CONTRIBUTING.md\`](./.github/CONTRIBUTING.md), then [\`.github/DEVELOPMENT.md\`](./.github/DEVELOPMENT.md).
|
|
47
44
|
Thanks! ${options.emoji}
|
|
@@ -44,16 +44,13 @@ const blockReleaseIt = base.createBlock({
|
|
|
44
44
|
issues: "write",
|
|
45
45
|
"pull-requests": "write"
|
|
46
46
|
},
|
|
47
|
-
steps: [
|
|
48
|
-
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
uses: resolveUses("apexskier/github-release-commenter", "v1", options.workflowsVersions),
|
|
55
|
-
with: {
|
|
56
|
-
"comment-template": `
|
|
47
|
+
steps: [{
|
|
48
|
+
env: { TAG_NAME: "${{ github.event.release.tag_name }}" },
|
|
49
|
+
run: "echo \"npm_version=${TAG_NAME#v}\" >> \"$GITHUB_ENV\""
|
|
50
|
+
}, {
|
|
51
|
+
uses: resolveUses("apexskier/github-release-commenter", "v1", options.workflowsVersions),
|
|
52
|
+
with: {
|
|
53
|
+
"comment-template": `
|
|
57
54
|
:tada: This is included in version {release_link} :tada:
|
|
58
55
|
|
|
59
56
|
The release is available on:
|
|
@@ -63,10 +60,9 @@ const blockReleaseIt = base.createBlock({
|
|
|
63
60
|
|
|
64
61
|
Cheers! 📦🚀
|
|
65
62
|
`,
|
|
66
|
-
|
|
67
|
-
}
|
|
63
|
+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
68
64
|
}
|
|
69
|
-
]
|
|
65
|
+
}]
|
|
70
66
|
}), ["post-release.yml"]),
|
|
71
67
|
"release.yaml": withPreviously(createSoloWorkflowFile({
|
|
72
68
|
concurrency: { group: "${{ github.workflow }}" },
|
|
@@ -3,7 +3,7 @@ const optionsBase = {
|
|
|
3
3
|
access: "public",
|
|
4
4
|
description: "Test description",
|
|
5
5
|
directory: ".",
|
|
6
|
-
documentation: { readme: { usage: "
|
|
6
|
+
documentation: { readme: { usage: "## Usage\n\nTest usage." } },
|
|
7
7
|
email: {
|
|
8
8
|
github: "github@email.com",
|
|
9
9
|
npm: "npm@email.com"
|
|
@@ -3,11 +3,11 @@ const startUsage = "## Usage";
|
|
|
3
3
|
async function readReadmeUsage(getReadme) {
|
|
4
4
|
const readme = await getReadme();
|
|
5
5
|
const indexOfUsage = readme.indexOf(startUsage);
|
|
6
|
-
if (indexOfUsage === -1) return;
|
|
7
|
-
const
|
|
8
|
-
const indexOfNextKnownHeading =
|
|
9
|
-
|
|
10
|
-
return
|
|
6
|
+
if (indexOfUsage === -1) return readme.trim() ? "" : void 0;
|
|
7
|
+
const remaining = readme.slice(indexOfUsage);
|
|
8
|
+
const indexOfNextKnownHeading = remaining.search(/## (?:Development|Contributing|Contributors)/);
|
|
9
|
+
const usage = (indexOfNextKnownHeading === -1 ? remaining : remaining.slice(0, indexOfNextKnownHeading)).trim();
|
|
10
|
+
return usage === startUsage ? void 0 : usage;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
export { readReadmeUsage };
|