create-typescript-app 2.26.7 → 2.28.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.
@@ -16,6 +16,7 @@ declare const blockVitest: bingo_stratum.BlockWithAddons<{
16
16
  uses: string;
17
17
  }))[];
18
18
  flags: string[];
19
+ environment?: string | undefined;
19
20
  }, {
20
21
  access: "public" | "restricted";
21
22
  description: string;
@@ -39,6 +39,7 @@ const blockVitest = base.createBlock({
39
39
  addons: {
40
40
  actionSteps: z.array(zActionStep).default([]),
41
41
  coverage: zCoverage.default({}),
42
+ environment: z.string().optional(),
42
43
  exclude: zExclude.default([]),
43
44
  flags: z.array(z.string()).default([])
44
45
  },
@@ -66,7 +67,7 @@ const blockVitest = base.createBlock({
66
67
  };
67
68
  },
68
69
  produce({ addons }) {
69
- const { actionSteps, coverage, exclude = [] } = addons;
70
+ const { actionSteps, coverage, environment, exclude = [] } = addons;
70
71
  const excludeText = JSON.stringify(
71
72
  Array.from(/* @__PURE__ */ new Set(["node_modules", ...exclude])).sort()
72
73
  );
@@ -227,7 +228,8 @@ export default defineConfig({
227
228
  ${coverage.exclude?.length ? `exclude: ${JSON.stringify(coverage.exclude)},
228
229
  ` : ""}include: ${JSON.stringify(coverage.include)},
229
230
  reporter: ["html", "lcov"],
230
- },
231
+ },${environment ? `
232
+ environment: "${environment}",` : ""}
231
233
  exclude: [${excludeText.slice(1, excludeText.length - 1)}],
232
234
  setupFiles: ["console-fail-test/setup"],
233
235
  },
@@ -0,0 +1,72 @@
1
+ import * as bingo_stratum from 'bingo-stratum';
2
+
3
+ declare const blockWebExt: bingo_stratum.BlockWithoutAddons<{
4
+ access: "public" | "restricted";
5
+ description: string;
6
+ directory: string;
7
+ documentation: {
8
+ readme: {
9
+ usage: string;
10
+ additional?: string | undefined;
11
+ explainer?: string | undefined;
12
+ footnotes?: string | undefined;
13
+ };
14
+ development?: string | undefined;
15
+ };
16
+ email: {
17
+ github: string;
18
+ npm: string;
19
+ };
20
+ title: string;
21
+ node: {
22
+ minimum: string;
23
+ pinned?: string | undefined;
24
+ };
25
+ owner: string;
26
+ repository: string;
27
+ type?: "commonjs" | "module" | undefined;
28
+ author?: string | undefined;
29
+ bin?: string | Record<string, string> | undefined;
30
+ contributors?: {
31
+ avatar_url: string;
32
+ contributions: string[];
33
+ login: string;
34
+ name: string;
35
+ profile: string;
36
+ }[] | undefined;
37
+ emoji?: string | undefined;
38
+ existingLabels?: {
39
+ name: string;
40
+ description: string;
41
+ color: string;
42
+ }[] | undefined;
43
+ funding?: string | undefined;
44
+ guide?: {
45
+ href: string;
46
+ title: string;
47
+ } | undefined;
48
+ keywords?: string[] | undefined;
49
+ logo?: {
50
+ alt: string;
51
+ src: string;
52
+ height?: number | undefined;
53
+ width?: number | undefined;
54
+ } | undefined;
55
+ packageData?: {
56
+ dependencies?: Record<string, string> | undefined;
57
+ devDependencies?: Record<string, string> | undefined;
58
+ peerDependencies?: Record<string, string> | undefined;
59
+ peerDependenciesMeta?: Record<string, unknown> | undefined;
60
+ scripts?: Record<string, string> | undefined;
61
+ } | undefined;
62
+ pnpm?: string | undefined;
63
+ rulesetId?: string | undefined;
64
+ version?: string | undefined;
65
+ words?: string[] | undefined;
66
+ workflowsVersions?: Record<string, Record<string, {
67
+ pinned?: boolean | undefined;
68
+ hash?: string | undefined;
69
+ }>> | undefined;
70
+ }>;
71
+
72
+ export { blockWebExt };
@@ -0,0 +1,124 @@
1
+ import { base } from "../base.js";
2
+ import { blockCSpell } from "./blockCSpell.js";
3
+ import { blockDevelopmentDocs } from "./blockDevelopmentDocs.js";
4
+ import { blockGitHubActionsCI } from "./blockGitHubActionsCI.js";
5
+ import { blockGitignore } from "./blockGitignore.js";
6
+ import { blockMarkdownlint } from "./blockMarkdownlint.js";
7
+ import { blockPackageJson } from "./blockPackageJson.js";
8
+ import { blockPrettier } from "./blockPrettier.js";
9
+ const blockWebExt = base.createBlock({
10
+ about: {
11
+ name: "Web-ext"
12
+ },
13
+ produce() {
14
+ return {
15
+ addons: [
16
+ blockCSpell({
17
+ ignores: ["assets"]
18
+ }),
19
+ blockDevelopmentDocs({
20
+ sections: {
21
+ Building: {
22
+ contents: `
23
+ Run [ESBuild](https://esbuild.github.io) locally to build source files:
24
+
25
+ \`\`\`shell
26
+ pnpm dev
27
+ \`\`\`
28
+
29
+ Add \`--watch\` to run the builder in a watch mode that continuously re-builds as you save files:
30
+
31
+ \`\`\`shell
32
+ pnpm dev --watch
33
+ \`\`\`
34
+ `,
35
+ innerSections: [
36
+ {
37
+ contents: `
38
+ Follow Google Chrome's _[Load an unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/#unpacked)_ guide to load this repository's directory as an extension locally.
39
+
40
+ > \u267B\uFE0F Remember to reload the extension in \`chrome://extensions\` whenever you make changes locally!
41
+ `,
42
+ heading: "Local Development with Chrome"
43
+ },
44
+ {
45
+ contents: `
46
+ Follow Firefox's _[Temporary installation in Firefox](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/)_ guide to load this repository's directory as an extension locally.
47
+
48
+ You'll then need to authorize the extension to run on <https://github.com>:
49
+
50
+ 1. Find and select the _Extensions_ icon in the top right of Firefox
51
+ 2. Select the _"Manage Extension"_ gear icon next to _Refined Saved Replies_
52
+ 3. Select the _"Always Allow on github.com"_ option
53
+
54
+ > \u267B\uFE0F Remember to reload the extension in \`about:debugging#/runtime/this-firefox\` whenever you make changes locally!
55
+ `,
56
+ heading: "Local Development with Firefox"
57
+ },
58
+ {
59
+ contents: `
60
+ Run [\`web-ext\`](https://extensionworkshop.com) to build a production-ready \`.zip\` under \`./web-ext-artifacts/\`:
61
+
62
+ \`\`\`shell
63
+ pnpm build
64
+ \`\`\`
65
+
66
+ Then upload that \`./web-ext-artifacts/refined_saved_replies-*.zip\` file to:
67
+
68
+ - [Chrome Web Store Developer Dashboard](https://chrome.google.com/webstore/devconsole)
69
+ - [Firefox Add-ons Developer Hub](https://addons.mozilla.org/en-US/developers/addon/submit/distribution)
70
+ `,
71
+ heading: "Production Builds"
72
+ }
73
+ ]
74
+ },
75
+ Linting: {
76
+ contents: {
77
+ items: [
78
+ `- \`pnpm lint:web-ext\` ([web-ext](https://extensionworkshop.com)): Lints browser extension metadata after \`pnpm dev\` creates local files`
79
+ ]
80
+ }
81
+ }
82
+ }
83
+ }),
84
+ blockGitHubActionsCI({
85
+ jobs: [
86
+ {
87
+ name: "Build",
88
+ steps: [{ run: "pnpm build" }]
89
+ },
90
+ {
91
+ name: "Lint Web-ext",
92
+ steps: [{ run: "pnpm dev" }, { run: "pnpm lint:web-ext" }]
93
+ }
94
+ ]
95
+ }),
96
+ blockGitignore({
97
+ ignores: ["*.zip", "web-ext-artifacts"]
98
+ }),
99
+ blockMarkdownlint({
100
+ ignores: ["assets/"]
101
+ }),
102
+ blockPackageJson({
103
+ properties: {
104
+ devDependencies: {
105
+ esbuild: "^0.25.0",
106
+ "web-ext": "^8.3.0"
107
+ },
108
+ scripts: {
109
+ build: "web-ext build --overwrite-dest",
110
+ dev: "esbuild src/content-script.ts --bundle --minify --outfile=lib/content-script.js --sourcemap",
111
+ "lint:web-ext": "web-ext lint"
112
+ }
113
+ }
114
+ }),
115
+ blockPrettier({
116
+ ignores: ["assets/"]
117
+ })
118
+ ]
119
+ };
120
+ }
121
+ });
122
+ export {
123
+ blockWebExt
124
+ };
@@ -46,6 +46,7 @@ export { blockTSup } from './blockTSup.js';
46
46
  export { blockTypeScript } from './blockTypeScript.js';
47
47
  export { blockVitest } from './blockVitest.js';
48
48
  export { blockVSCode } from './blockVSCode.js';
49
+ export { blockWebExt } from './blockWebExt.js';
49
50
  import 'zod';
50
51
 
51
52
  declare const blocks: {
@@ -3349,6 +3350,7 @@ declare const blocks: {
3349
3350
  uses: string;
3350
3351
  }))[];
3351
3352
  flags: string[];
3353
+ environment?: string | undefined;
3352
3354
  }, {
3353
3355
  access: "public" | "restricted";
3354
3356
  description: string;
@@ -3494,6 +3496,74 @@ declare const blocks: {
3494
3496
  hash?: string | undefined;
3495
3497
  }>> | undefined;
3496
3498
  }>;
3499
+ blockWebExt: bingo_stratum.BlockWithoutAddons<{
3500
+ access: "public" | "restricted";
3501
+ description: string;
3502
+ directory: string;
3503
+ documentation: {
3504
+ readme: {
3505
+ usage: string;
3506
+ additional?: string | undefined;
3507
+ explainer?: string | undefined;
3508
+ footnotes?: string | undefined;
3509
+ };
3510
+ development?: string | undefined;
3511
+ };
3512
+ email: {
3513
+ github: string;
3514
+ npm: string;
3515
+ };
3516
+ title: string;
3517
+ node: {
3518
+ minimum: string;
3519
+ pinned?: string | undefined;
3520
+ };
3521
+ owner: string;
3522
+ repository: string;
3523
+ type?: "commonjs" | "module" | undefined;
3524
+ author?: string | undefined;
3525
+ bin?: string | Record<string, string> | undefined;
3526
+ contributors?: {
3527
+ avatar_url: string;
3528
+ contributions: string[];
3529
+ login: string;
3530
+ name: string;
3531
+ profile: string;
3532
+ }[] | undefined;
3533
+ emoji?: string | undefined;
3534
+ existingLabels?: {
3535
+ name: string;
3536
+ description: string;
3537
+ color: string;
3538
+ }[] | undefined;
3539
+ funding?: string | undefined;
3540
+ guide?: {
3541
+ href: string;
3542
+ title: string;
3543
+ } | undefined;
3544
+ keywords?: string[] | undefined;
3545
+ logo?: {
3546
+ alt: string;
3547
+ src: string;
3548
+ height?: number | undefined;
3549
+ width?: number | undefined;
3550
+ } | undefined;
3551
+ packageData?: {
3552
+ dependencies?: Record<string, string> | undefined;
3553
+ devDependencies?: Record<string, string> | undefined;
3554
+ peerDependencies?: Record<string, string> | undefined;
3555
+ peerDependenciesMeta?: Record<string, unknown> | undefined;
3556
+ scripts?: Record<string, string> | undefined;
3557
+ } | undefined;
3558
+ pnpm?: string | undefined;
3559
+ rulesetId?: string | undefined;
3560
+ version?: string | undefined;
3561
+ words?: string[] | undefined;
3562
+ workflowsVersions?: Record<string, Record<string, {
3563
+ pinned?: boolean | undefined;
3564
+ hash?: string | undefined;
3565
+ }>> | undefined;
3566
+ }>;
3497
3567
  };
3498
3568
 
3499
3569
  export { blocks };
@@ -44,6 +44,7 @@ import { blockTSup } from "./blockTSup.js";
44
44
  import { blockTypeScript } from "./blockTypeScript.js";
45
45
  import { blockVitest } from "./blockVitest.js";
46
46
  import { blockVSCode } from "./blockVSCode.js";
47
+ import { blockWebExt } from "./blockWebExt.js";
47
48
  const blocks = {
48
49
  blockAllContributors,
49
50
  blockAreTheTypesWrong,
@@ -90,7 +91,8 @@ const blocks = {
90
91
  blockTSup,
91
92
  blockTypeScript,
92
93
  blockVitest,
93
- blockVSCode
94
+ blockVSCode,
95
+ blockWebExt
94
96
  };
95
97
  import { blockAllContributors as blockAllContributors2 } from "./blockAllContributors.js";
96
98
  import { blockAreTheTypesWrong as blockAreTheTypesWrong2 } from "./blockAreTheTypesWrong.js";
@@ -139,6 +141,7 @@ import { blockTSup as blockTSup2 } from "./blockTSup.js";
139
141
  import { blockTypeScript as blockTypeScript2 } from "./blockTypeScript.js";
140
142
  import { blockVitest as blockVitest2 } from "./blockVitest.js";
141
143
  import { blockVSCode as blockVSCode2 } from "./blockVSCode.js";
144
+ import { blockWebExt as blockWebExt2 } from "./blockWebExt.js";
142
145
  export {
143
146
  blockAllContributors2 as blockAllContributors,
144
147
  blockAreTheTypesWrong2 as blockAreTheTypesWrong,
@@ -187,5 +190,6 @@ export {
187
190
  blockTypeScript2 as blockTypeScript,
188
191
  blockVSCode2 as blockVSCode,
189
192
  blockVitest2 as blockVitest,
193
+ blockWebExt2 as blockWebExt,
190
194
  blocks
191
195
  };
@@ -1,5 +1,5 @@
1
1
  var name = "create-typescript-app";
2
- var version = "2.26.6";
2
+ var version = "2.27.0";
3
3
  var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
4
4
  var repository = {
5
5
  type: "git",
package/lib/index.d.ts CHANGED
@@ -53,6 +53,7 @@ export { blockTSup } from './blocks/blockTSup.js';
53
53
  export { blockTypeScript } from './blocks/blockTypeScript.js';
54
54
  export { blockVitest } from './blocks/blockVitest.js';
55
55
  export { blockVSCode } from './blocks/blockVSCode.js';
56
+ export { blockWebExt } from './blocks/blockWebExt.js';
56
57
  export { presetCommon } from './presets/common.js';
57
58
  export { presetEverything } from './presets/everything.js';
58
59
  export { presetMinimal } from './presets/minimal.js';
package/lib/template.js CHANGED
@@ -5,6 +5,7 @@ import { blockESLintPlugin } from "./blocks/blockESLintPlugin.js";
5
5
  import { blockNcc } from "./blocks/blockNcc.js";
6
6
  import { blockRemoveDependencies } from "./blocks/blockRemoveDependencies.js";
7
7
  import { blockRemoveFiles } from "./blocks/blockRemoveFiles.js";
8
+ import { blockWebExt } from "./blocks/blockWebExt.js";
8
9
  import { presetCommon } from "./presets/common.js";
9
10
  import { presetEverything } from "./presets/everything.js";
10
11
  import { presetMinimal } from "./presets/minimal.js";
@@ -22,7 +23,8 @@ const template = base.createStratumTemplate({
22
23
  blockESLintPlugin,
23
24
  blockNcc,
24
25
  blockRemoveDependencies,
25
- blockRemoveFiles
26
+ blockRemoveFiles,
27
+ blockWebExt
26
28
  ],
27
29
  presets: [presetMinimal, presetCommon, presetEverything],
28
30
  suggested: presetCommon
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "2.26.7",
3
+ "version": "2.28.0",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",