create-typescript-app 2.5.0 → 2.6.1
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 +3 -3
- package/lib/base.d.ts +7 -6
- package/lib/base.js +122 -96
- package/lib/blocks/blockAllContributors.d.ts +1 -0
- package/lib/blocks/blockAreTheTypesWrong.d.ts +1 -0
- package/lib/blocks/blockCSpell.d.ts +1 -0
- package/lib/blocks/blockCodecov.d.ts +1 -0
- package/lib/blocks/blockContributingDocs.d.ts +1 -0
- package/lib/blocks/blockContributingDocs.js +2 -2
- package/lib/blocks/blockContributorCovenant.d.ts +1 -0
- package/lib/blocks/blockDevelopmentDocs.d.ts +1 -0
- package/lib/blocks/blockESLint.d.ts +1 -0
- package/lib/blocks/blockESLintComments.d.ts +1 -0
- package/lib/blocks/blockESLintJSDoc.d.ts +1 -0
- package/lib/blocks/blockESLintJSONC.d.ts +1 -0
- package/lib/blocks/blockESLintMarkdown.d.ts +1 -0
- package/lib/blocks/blockESLintMoreStyling.d.ts +1 -0
- package/lib/blocks/blockESLintNode.d.ts +1 -0
- package/lib/blocks/blockESLintNode.js +2 -9
- package/lib/blocks/blockESLintPackageJson.d.ts +1 -0
- package/lib/blocks/blockESLintPerfectionist.d.ts +1 -0
- package/lib/blocks/blockESLintRegexp.d.ts +1 -0
- package/lib/blocks/blockESLintYML.d.ts +1 -0
- package/lib/blocks/blockExampleFiles.d.ts +1 -0
- package/lib/blocks/blockFunding.d.ts +1 -0
- package/lib/blocks/blockGitHubActionsCI.d.ts +1 -0
- package/lib/blocks/blockGitHubApps.d.ts +1 -0
- package/lib/blocks/blockGitHubIssueTemplates.d.ts +1 -0
- package/lib/blocks/blockGitHubPRTemplate.d.ts +1 -0
- package/lib/blocks/blockGitHubPRTemplate.js +1 -1
- package/lib/blocks/blockGitignore.d.ts +1 -0
- package/lib/blocks/blockKnip.d.ts +1 -0
- package/lib/blocks/blockMITLicense.d.ts +1 -0
- package/lib/blocks/blockMarkdownlint.d.ts +1 -0
- package/lib/blocks/blockNvmrc.d.ts +1 -0
- package/lib/blocks/blockPRCompliance.d.ts +1 -0
- package/lib/blocks/blockPackageJson.d.ts +1 -0
- package/lib/blocks/blockPnpmDedupe.d.ts +1 -0
- package/lib/blocks/blockPrettier.d.ts +1 -0
- package/lib/blocks/blockPrettierPluginCurly.d.ts +1 -0
- package/lib/blocks/blockPrettierPluginPackageJson.d.ts +1 -0
- package/lib/blocks/blockPrettierPluginSh.d.ts +1 -0
- package/lib/blocks/blockREADME.d.ts +1 -0
- package/lib/blocks/blockREADME.js +1 -1
- package/lib/blocks/blockReleaseIt.d.ts +1 -0
- package/lib/blocks/blockRenovate.d.ts +1 -0
- package/lib/blocks/blockRepositoryBranchRuleset.d.ts +1 -0
- package/lib/blocks/blockRepositoryLabels.d.ts +1 -0
- package/lib/blocks/blockRepositorySecrets.d.ts +1 -0
- package/lib/blocks/blockRepositorySettings.d.ts +1 -0
- package/lib/blocks/blockSecurityDocs.d.ts +1 -0
- package/lib/blocks/blockTSup.d.ts +1 -0
- package/lib/blocks/blockTemplatedWith.d.ts +1 -0
- package/lib/blocks/blockTypeScript.d.ts +1 -0
- package/lib/blocks/blockVSCode.d.ts +1 -0
- package/lib/blocks/blockVitest.d.ts +1 -0
- package/lib/blocks/index.d.ts +43 -0
- package/lib/blocks/options.fakes.d.ts +1 -0
- package/lib/blocks/options.fakes.js +1 -0
- package/lib/constants.d.ts +8 -0
- package/lib/constants.js +9 -0
- package/lib/data/packageData.d.ts +3 -3
- package/lib/index.d.ts +2 -0
- package/lib/inputs/inputFromOctokit.js +1 -0
- package/lib/options/readAuthor.d.ts +7 -0
- package/lib/options/readAuthor.js +6 -0
- package/lib/options/readEmailFromCodeOfConduct.d.ts +5 -0
- package/lib/options/readEmailFromCodeOfConduct.js +10 -0
- package/lib/options/readEmailFromGit.d.ts +5 -0
- package/lib/options/readEmailFromGit.js +7 -0
- package/lib/options/readEmailFromNpm.d.ts +7 -0
- package/lib/options/readEmailFromNpm.js +6 -0
- package/lib/options/readEmails.d.ts +1 -6
- package/lib/options/readEmails.js +3 -8
- package/lib/options/readEmoji.d.ts +3 -0
- package/lib/options/readEmoji.js +6 -0
- package/lib/options/readExistingLabels.d.ts +9 -0
- package/lib/options/{getExistingLabels.js → readExistingLabels.js} +3 -2
- package/lib/options/readExplainer.d.ts +3 -0
- package/lib/options/readExplainer.js +12 -0
- package/lib/options/readFunding.d.ts +3 -1
- package/lib/options/readFunding.js +6 -6
- package/lib/options/readGitDefaults.d.ts +5 -0
- package/lib/options/readGitDefaults.js +12 -0
- package/lib/options/readGuide.d.ts +3 -1
- package/lib/options/readGuide.js +8 -3
- package/lib/options/readLogo.d.ts +8 -0
- package/lib/options/readLogo.js +19 -0
- package/lib/options/readNode.d.ts +8 -0
- package/lib/options/readNode.js +12 -0
- package/lib/options/readNpmDefaults.d.ts +6 -0
- package/lib/options/readNpmDefaults.js +9 -0
- package/lib/options/readOwner.d.ts +8 -0
- package/lib/options/readOwner.js +9 -0
- package/lib/options/readPackageAuthor.d.ts +8 -0
- package/lib/options/{parsePackageAuthor.js → readPackageAuthor.js} +3 -2
- package/lib/options/readPackageData.d.ts +5 -1
- package/lib/options/readPackageData.js +7 -3
- package/lib/options/readPackageDataFull.d.ts +6 -0
- package/lib/options/readPackageDataFull.js +9 -0
- package/lib/options/readRepository.d.ts +9 -0
- package/lib/options/readRepository.js +6 -0
- package/lib/options/readRulesetId.d.ts +5 -0
- package/lib/options/readRulesetId.js +16 -0
- package/lib/options/readTitle.d.ts +3 -0
- package/lib/options/readTitle.js +13 -0
- package/lib/options/readUsage.d.ts +3 -0
- package/lib/options/readUsage.js +14 -0
- package/lib/options/readUsageFromReadme.d.ts +3 -0
- package/lib/options/{getUsageFromReadme.js → readUsageFromReadme.js} +2 -2
- package/lib/presets/common.d.ts +1 -0
- package/lib/presets/everything.d.ts +1 -0
- package/lib/presets/index.d.ts +3 -0
- package/lib/presets/minimal.d.ts +1 -0
- package/lib/template.d.ts +1 -0
- package/lib/utils/swallowErrorAsync.d.ts +3 -0
- package/lib/utils/swallowErrorAsync.js +10 -0
- package/package.json +3 -3
- package/lib/options/getExistingLabels.d.ts +0 -9
- package/lib/options/getUsageFromReadme.d.ts +0 -3
- package/lib/options/parsePackageAuthor.d.ts +0 -8
- package/lib/options/readDefaultsFromReadme.d.ts +0 -13
- package/lib/options/readDefaultsFromReadme.js +0 -57
- package/lib/options/readGitHubEmail.d.ts +0 -3
- package/lib/options/readGitHubEmail.js +0 -11
- package/lib/utils/tryCatchAsync.d.ts +0 -3
- package/lib/utils/tryCatchAsync.js +0 -10
- package/lib/utils/tryCatchLazyValueAsync.d.ts +0 -3
- package/lib/utils/tryCatchLazyValueAsync.js +0 -8
package/README.md
CHANGED
|
@@ -48,8 +48,8 @@ You can read more about the supported runtime modes in their docs pages:
|
|
|
48
48
|
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
|
-
2. [**
|
|
52
|
-
3. [**FAQs**](./docs/FAQs.md): frequently asked questions
|
|
51
|
+
2. [**CLI**](./docs/CLI.md): providing granular options to customize how the template is run.
|
|
52
|
+
3. [**FAQs**](./docs/FAQs.md): frequently asked questions and troubleshooting
|
|
53
53
|
|
|
54
54
|
> [!NOTE]
|
|
55
55
|
> This template is early stage, opinionated, and not endorsed by the TypeScript team.
|
|
@@ -59,7 +59,7 @@ You can read more about `create-typescript-app` and the tooling it supports:
|
|
|
59
59
|
## Development
|
|
60
60
|
|
|
61
61
|
See [`.github/CONTRIBUTING.md`](./.github/CONTRIBUTING.md), then [`.github/DEVELOPMENT.md`](./.github/DEVELOPMENT.md).
|
|
62
|
-
Thanks!
|
|
62
|
+
Thanks! 🎁
|
|
63
63
|
|
|
64
64
|
## Contributors
|
|
65
65
|
|
package/lib/base.d.ts
CHANGED
|
@@ -9,16 +9,16 @@ declare const zContributor: z.ZodObject<{
|
|
|
9
9
|
name: z.ZodString;
|
|
10
10
|
profile: z.ZodString;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
name: string;
|
|
12
13
|
avatar_url: string;
|
|
13
14
|
contributions: string[];
|
|
14
15
|
login: string;
|
|
15
|
-
name: string;
|
|
16
16
|
profile: string;
|
|
17
17
|
}, {
|
|
18
|
+
name: string;
|
|
18
19
|
avatar_url: string;
|
|
19
20
|
contributions: string[];
|
|
20
21
|
login: string;
|
|
21
|
-
name: string;
|
|
22
22
|
profile: string;
|
|
23
23
|
}>;
|
|
24
24
|
type Contributor = z.infer<typeof zContributor>;
|
|
@@ -33,16 +33,16 @@ declare const base: bingo_stratum.Base<{
|
|
|
33
33
|
name: z.ZodString;
|
|
34
34
|
profile: z.ZodString;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
name: string;
|
|
36
37
|
avatar_url: string;
|
|
37
38
|
contributions: string[];
|
|
38
39
|
login: string;
|
|
39
|
-
name: string;
|
|
40
40
|
profile: string;
|
|
41
41
|
}, {
|
|
42
|
+
name: string;
|
|
42
43
|
avatar_url: string;
|
|
43
44
|
contributions: string[];
|
|
44
45
|
login: string;
|
|
45
|
-
name: string;
|
|
46
46
|
profile: string;
|
|
47
47
|
}>, "many">>;
|
|
48
48
|
description: z.ZodDefault<z.ZodString>;
|
|
@@ -64,6 +64,7 @@ declare const base: bingo_stratum.Base<{
|
|
|
64
64
|
github: string;
|
|
65
65
|
npm: string;
|
|
66
66
|
}>;
|
|
67
|
+
emoji: z.ZodOptional<z.ZodString>;
|
|
67
68
|
existingLabels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
68
69
|
color: z.ZodString;
|
|
69
70
|
description: z.ZodString;
|
|
@@ -83,11 +84,11 @@ declare const base: bingo_stratum.Base<{
|
|
|
83
84
|
href: z.ZodString;
|
|
84
85
|
title: z.ZodString;
|
|
85
86
|
}, "strip", z.ZodTypeAny, {
|
|
86
|
-
href: string;
|
|
87
87
|
title: string;
|
|
88
|
-
}, {
|
|
89
88
|
href: string;
|
|
89
|
+
}, {
|
|
90
90
|
title: string;
|
|
91
|
+
href: string;
|
|
91
92
|
}>>;
|
|
92
93
|
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
93
94
|
logo: z.ZodOptional<z.ZodObject<{
|
package/lib/base.js
CHANGED
|
@@ -1,27 +1,35 @@
|
|
|
1
1
|
import { createBase } from "bingo-stratum";
|
|
2
|
-
import { execaCommand } from "execa";
|
|
3
|
-
import gitRemoteOriginUrl from "git-remote-origin-url";
|
|
4
|
-
import gitUrlParse from "git-url-parse";
|
|
5
2
|
import { inputFromFile } from "input-from-file";
|
|
6
3
|
import { inputFromScript } from "input-from-script";
|
|
7
4
|
import lazyValue from "lazy-value";
|
|
8
|
-
import npmUser from "npm-user";
|
|
9
5
|
import { z } from "zod";
|
|
10
|
-
import { inputFromOctokit } from "./inputs/inputFromOctokit.js";
|
|
11
|
-
import { getExistingLabels } from "./options/getExistingLabels.js";
|
|
12
|
-
import { parsePackageAuthor } from "./options/parsePackageAuthor.js";
|
|
13
6
|
import { readAllContributors } from "./options/readAllContributors.js";
|
|
14
|
-
import {
|
|
7
|
+
import { readAuthor } from "./options/readAuthor.js";
|
|
15
8
|
import { readDescription } from "./options/readDescription.js";
|
|
16
9
|
import { readDocumentation } from "./options/readDocumentation.js";
|
|
10
|
+
import { readEmailFromCodeOfConduct } from "./options/readEmailFromCodeOfConduct.js";
|
|
11
|
+
import { readEmailFromGit } from "./options/readEmailFromGit.js";
|
|
12
|
+
import { readEmailFromNpm } from "./options/readEmailFromNpm.js";
|
|
17
13
|
import { readEmails } from "./options/readEmails.js";
|
|
14
|
+
import { readEmoji } from "./options/readEmoji.js";
|
|
15
|
+
import { readExistingLabels } from "./options/readExistingLabels.js";
|
|
16
|
+
import { readExplainer } from "./options/readExplainer.js";
|
|
18
17
|
import { readFileSafe } from "./options/readFileSafe.js";
|
|
19
18
|
import { readFunding } from "./options/readFunding.js";
|
|
19
|
+
import { readGitDefaults } from "./options/readGitDefaults.js";
|
|
20
20
|
import { readGuide } from "./options/readGuide.js";
|
|
21
|
+
import { readLogo } from "./options/readLogo.js";
|
|
22
|
+
import { readNode } from "./options/readNode.js";
|
|
23
|
+
import { readNpmDefaults } from "./options/readNpmDefaults.js";
|
|
24
|
+
import { readOwner } from "./options/readOwner.js";
|
|
25
|
+
import { readPackageAuthor } from "./options/readPackageAuthor.js";
|
|
21
26
|
import { readPackageData } from "./options/readPackageData.js";
|
|
27
|
+
import { readPackageDataFull } from "./options/readPackageDataFull.js";
|
|
22
28
|
import { readPnpm } from "./options/readPnpm.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
29
|
+
import { readRepository } from "./options/readRepository.js";
|
|
30
|
+
import { readRulesetId } from "./options/readRulesetId.js";
|
|
31
|
+
import { readTitle } from "./options/readTitle.js";
|
|
32
|
+
import { readUsage } from "./options/readUsage.js";
|
|
25
33
|
const zContributor = z.object({
|
|
26
34
|
avatar_url: z.string(),
|
|
27
35
|
contributions: z.array(z.string()),
|
|
@@ -35,7 +43,7 @@ const base = createBase({
|
|
|
35
43
|
author: z.string().optional().describe("username on npm to publish packages under"),
|
|
36
44
|
bin: z.string().optional().describe('value to set in `package.json`\'s `"bin"` property'),
|
|
37
45
|
contributors: z.array(zContributor).optional().describe("AllContributors contributors to store in .all-contributorsrc"),
|
|
38
|
-
description: z.string().default("A very lovely package. Hooray!
|
|
46
|
+
description: z.string().default("A very lovely package. Hooray!").describe("'Sentence case.' description of the repository"),
|
|
39
47
|
directory: z.string().describe("Directory to create the repository in"),
|
|
40
48
|
documentation: z.string().optional().describe("any additional docs to add to .github/DEVELOPMENT.md"),
|
|
41
49
|
email: z.union([
|
|
@@ -49,6 +57,7 @@ const base = createBase({
|
|
|
49
57
|
).describe(
|
|
50
58
|
"email address to be listed as the point of contact in docs and packages"
|
|
51
59
|
),
|
|
60
|
+
emoji: z.string().optional().describe("decorative emoji to use in descriptions and docs"),
|
|
52
61
|
existingLabels: z.array(
|
|
53
62
|
z.object({
|
|
54
63
|
color: z.string(),
|
|
@@ -71,13 +80,13 @@ const base = createBase({
|
|
|
71
80
|
src: z.string(),
|
|
72
81
|
width: z.number().optional()
|
|
73
82
|
}).optional().describe(
|
|
74
|
-
"local image file
|
|
83
|
+
"local image file and alt text to display near the top of the README.md"
|
|
75
84
|
),
|
|
76
85
|
node: z.object({
|
|
77
86
|
minimum: z.string(),
|
|
78
87
|
pinned: z.string().optional()
|
|
79
|
-
}).optional().describe("
|
|
80
|
-
owner: z.string().describe("
|
|
88
|
+
}).optional().describe("Node.js engine version(s) to pin and require a minimum of"),
|
|
89
|
+
owner: z.string().describe("organization or user owning the repository"),
|
|
81
90
|
packageData: z.object({
|
|
82
91
|
dependencies: z.record(z.string(), z.string()).optional(),
|
|
83
92
|
devDependencies: z.record(z.string(), z.string()).optional(),
|
|
@@ -87,97 +96,114 @@ const base = createBase({
|
|
|
87
96
|
repository: z.string().describe("'kebab-case' or 'PascalCase' title of the repository"),
|
|
88
97
|
rulesetId: z.string().optional().describe("GitHub branch ruleset ID for main branch protections"),
|
|
89
98
|
title: z.string().describe("'Title Case' title for the repository"),
|
|
90
|
-
usage: z.string().optional().describe("
|
|
99
|
+
usage: z.string().optional().describe("Markdown docs to put in README.md under the ## Usage heading"),
|
|
91
100
|
version: z.string().optional().describe("package version to publish as and store in `package.json`")
|
|
92
101
|
},
|
|
93
102
|
prepare({ options, take }) {
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
103
|
+
const getAllContributors = lazyValue(
|
|
104
|
+
async () => await readAllContributors(take)
|
|
105
|
+
);
|
|
106
|
+
const getAuthor = lazyValue(
|
|
107
|
+
async () => await readAuthor(getPackageAuthor, getNpmDefaults, options.owner)
|
|
108
|
+
);
|
|
109
|
+
const getBin = lazyValue(async () => (await getPackageDataFull()).bin);
|
|
110
|
+
const getEmoji = lazyValue(async () => await readEmoji(getDescription));
|
|
111
|
+
const getDescription = lazyValue(
|
|
112
|
+
async () => await readDescription(getPackageDataFull, getReadme)
|
|
113
|
+
);
|
|
114
|
+
const getDocumentation = lazyValue(
|
|
115
|
+
async () => await readDocumentation(take)
|
|
116
|
+
);
|
|
117
|
+
const getEmail = lazyValue(
|
|
118
|
+
async () => await readEmails(
|
|
119
|
+
getEmailFromCodeOfConduct,
|
|
120
|
+
getEmailFromGit,
|
|
121
|
+
getEmailFromNpm
|
|
122
|
+
)
|
|
123
|
+
);
|
|
124
|
+
const getEmailFromCodeOfConduct = lazyValue(
|
|
125
|
+
async () => await readEmailFromCodeOfConduct(take)
|
|
126
|
+
);
|
|
127
|
+
const getEmailFromGit = lazyValue(async () => await readEmailFromGit(take));
|
|
128
|
+
const getEmailFromNpm = lazyValue(
|
|
129
|
+
async () => await readEmailFromNpm(getNpmDefaults, getPackageAuthor)
|
|
130
|
+
);
|
|
131
|
+
const getExistingLabels = lazyValue(
|
|
132
|
+
async () => await readExistingLabels(take, getOwner, getRepository)
|
|
133
|
+
);
|
|
134
|
+
const getExplainer = lazyValue(async () => await readExplainer(getReadme));
|
|
135
|
+
const getFunding = lazyValue(async () => await readFunding(take));
|
|
136
|
+
const getGitDefaults = lazyValue(async () => await readGitDefaults());
|
|
137
|
+
const getGuide = lazyValue(async () => await readGuide(take));
|
|
138
|
+
const getLogo = lazyValue(async () => await readLogo(getReadme));
|
|
139
|
+
const getPackageData = lazyValue(
|
|
140
|
+
async () => await readPackageData(getPackageDataFull)
|
|
141
|
+
);
|
|
142
|
+
const getPackageDataFull = lazyValue(
|
|
143
|
+
async () => await readPackageDataFull(take)
|
|
144
|
+
);
|
|
145
|
+
const getNode = lazyValue(
|
|
146
|
+
async () => await readNode(getNvmrc, getPackageDataFull)
|
|
147
|
+
);
|
|
148
|
+
const getNpmDefaults = lazyValue(
|
|
149
|
+
async () => await readNpmDefaults(getNpmWhoami)
|
|
150
|
+
);
|
|
151
|
+
const getNpmWhoami = lazyValue(
|
|
152
|
+
async () => await take(inputFromScript, { command: "npm whoami --offline" })
|
|
153
|
+
);
|
|
154
|
+
const getNvmrc = lazyValue(
|
|
97
155
|
async () => await take(inputFromFile, {
|
|
98
156
|
filePath: ".nvmrc"
|
|
99
157
|
})
|
|
100
158
|
);
|
|
101
|
-
const
|
|
102
|
-
async () =>
|
|
103
|
-
);
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
);
|
|
127
|
-
const npmDefaults = tryCatchLazyValueAsync(async () => {
|
|
128
|
-
const whoami = (await execaCommand(`npm whoami`)).stdout;
|
|
129
|
-
return whoami ? await npmUser(whoami) : void 0;
|
|
130
|
-
});
|
|
131
|
-
const packageData = lazyValue(readPackageData);
|
|
132
|
-
const packageAuthor = lazyValue(
|
|
133
|
-
async () => parsePackageAuthor(await packageData())
|
|
134
|
-
);
|
|
135
|
-
const author = lazyValue(
|
|
136
|
-
async () => (await packageAuthor()).author ?? (await npmDefaults())?.name ?? options.owner
|
|
137
|
-
);
|
|
138
|
-
const node = lazyValue(async () => {
|
|
139
|
-
const { engines } = await packageData();
|
|
140
|
-
return {
|
|
141
|
-
minimum: (engines?.node && /[\d+.]+/.exec(engines.node))?.[0] ?? "18.3.0",
|
|
142
|
-
pinned: swallowError(await nvmrc())?.trim() ?? "20.18.0"
|
|
143
|
-
};
|
|
144
|
-
});
|
|
145
|
-
const pnpm = lazyValue(async () => readPnpm(packageData));
|
|
146
|
-
const version = lazyValue(async () => (await packageData()).version);
|
|
147
|
-
const owner = lazyValue(
|
|
148
|
-
async () => (await gitDefaults())?.organization ?? (await packageAuthor()).author ?? await githubCliUser()
|
|
149
|
-
);
|
|
150
|
-
const repository = lazyValue(
|
|
151
|
-
async () => options.repository ?? (await gitDefaults())?.name ?? (await packageData()).name ?? options.directory
|
|
152
|
-
);
|
|
153
|
-
const email = lazyValue(async () => readEmails(npmDefaults, packageAuthor));
|
|
159
|
+
const getOwner = lazyValue(
|
|
160
|
+
async () => await readOwner(take, getGitDefaults, getPackageAuthor)
|
|
161
|
+
);
|
|
162
|
+
const getPackageAuthor = lazyValue(
|
|
163
|
+
async () => await readPackageAuthor(getPackageDataFull)
|
|
164
|
+
);
|
|
165
|
+
const getPnpm = lazyValue(async () => await readPnpm(getPackageDataFull));
|
|
166
|
+
const getReadme = lazyValue(
|
|
167
|
+
async () => await readFileSafe("README.md", "")
|
|
168
|
+
);
|
|
169
|
+
const getRepository = lazyValue(
|
|
170
|
+
async () => await readRepository(getGitDefaults, getPackageDataFull, options)
|
|
171
|
+
);
|
|
172
|
+
const getRulesetId = lazyValue(
|
|
173
|
+
async () => await readRulesetId(take, getOwner, getRepository)
|
|
174
|
+
);
|
|
175
|
+
const getTitle = lazyValue(
|
|
176
|
+
async () => await readTitle(getReadme, getRepository)
|
|
177
|
+
);
|
|
178
|
+
const getUsage = lazyValue(
|
|
179
|
+
async () => await readUsage(getEmoji, getReadme, getRepository)
|
|
180
|
+
);
|
|
181
|
+
const getVersion = lazyValue(
|
|
182
|
+
async () => (await getPackageDataFull()).version
|
|
183
|
+
);
|
|
154
184
|
return {
|
|
155
185
|
access: "public",
|
|
156
|
-
author,
|
|
157
|
-
bin:
|
|
158
|
-
contributors:
|
|
159
|
-
description:
|
|
160
|
-
documentation,
|
|
161
|
-
email,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
repository,
|
|
178
|
-
rulesetId,
|
|
179
|
-
...readDefaultsFromReadme(readme, repository),
|
|
180
|
-
version
|
|
186
|
+
author: getAuthor,
|
|
187
|
+
bin: getBin,
|
|
188
|
+
contributors: getAllContributors,
|
|
189
|
+
description: getDescription,
|
|
190
|
+
documentation: getDocumentation,
|
|
191
|
+
email: getEmail,
|
|
192
|
+
emoji: getEmoji,
|
|
193
|
+
existingLabels: getExistingLabels,
|
|
194
|
+
explainer: getExplainer,
|
|
195
|
+
funding: getFunding,
|
|
196
|
+
guide: getGuide,
|
|
197
|
+
logo: getLogo,
|
|
198
|
+
node: getNode,
|
|
199
|
+
owner: getOwner,
|
|
200
|
+
packageData: getPackageData,
|
|
201
|
+
pnpm: getPnpm,
|
|
202
|
+
repository: getRepository,
|
|
203
|
+
rulesetId: getRulesetId,
|
|
204
|
+
title: getTitle,
|
|
205
|
+
usage: getUsage,
|
|
206
|
+
version: getVersion
|
|
181
207
|
};
|
|
182
208
|
}
|
|
183
209
|
});
|
|
@@ -10,7 +10,7 @@ const blockContributingDocs = base.createBlock({
|
|
|
10
10
|
".github": {
|
|
11
11
|
"CONTRIBUTING.md": `# Contributing
|
|
12
12
|
|
|
13
|
-
Thanks for your interest in contributing to \`${options.repository}\`!
|
|
13
|
+
Thanks for your interest in contributing to \`${options.repository}\`! ${options.emoji}
|
|
14
14
|
|
|
15
15
|
> After this page, see [DEVELOPMENT.md](./DEVELOPMENT.md) for local development instructions.
|
|
16
16
|
|
|
@@ -104,7 +104,7 @@ Please do ping the maintainer who merged your PR if that doesn't happen within 2
|
|
|
104
104
|
|
|
105
105
|
If you made it all the way to the end, bravo dear user, we love you.
|
|
106
106
|
Please include your favorite emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.
|
|
107
|
-
|
|
107
|
+
${options.emoji} is a good starter if you're not sure which to use.
|
|
108
108
|
`
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -4,7 +4,7 @@ const blockESLintNode = base.createBlock({
|
|
|
4
4
|
about: {
|
|
5
5
|
name: "ESLint Node Plugin"
|
|
6
6
|
},
|
|
7
|
-
produce(
|
|
7
|
+
produce() {
|
|
8
8
|
return {
|
|
9
9
|
addons: [
|
|
10
10
|
blockESLint({
|
|
@@ -13,14 +13,7 @@ const blockESLintNode = base.createBlock({
|
|
|
13
13
|
{
|
|
14
14
|
extends: ["tseslint.configs.disableTypeChecked"],
|
|
15
15
|
files: ["**/*.md/*.ts"],
|
|
16
|
-
|
|
17
|
-
rules: {
|
|
18
|
-
"n/no-missing-import": [
|
|
19
|
-
"error",
|
|
20
|
-
{ allowModules: [options.repository] }
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
}
|
|
16
|
+
rules: { "n/no-missing-import": "off" }
|
|
24
17
|
}
|
|
25
18
|
],
|
|
26
19
|
imports: [{ source: "eslint-plugin-n", specifier: "n" }]
|
|
@@ -7,7 +7,7 @@ const blockGitHubPRTemplate = base.createBlock({
|
|
|
7
7
|
return {
|
|
8
8
|
files: {
|
|
9
9
|
".github": {
|
|
10
|
-
"PULL_REQUEST_TEMPLATE.md": `<!-- \u{1F44B} Hi, thanks for sending a PR to ${options.repository}!
|
|
10
|
+
"PULL_REQUEST_TEMPLATE.md": `<!-- \u{1F44B} Hi, thanks for sending a PR to ${options.repository}! ${options.emoji}.
|
|
11
11
|
Please fill out all fields below and make sure each item is true and [x] checked.
|
|
12
12
|
Otherwise we may not be able to review your PR. -->
|
|
13
13
|
|