create-bunli 0.7.0 → 0.8.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.
Files changed (106) hide show
  1. package/README.md +18 -6
  2. package/dist/cli.d.ts +1 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +372 -195
  5. package/dist/create-project.d.ts +5 -4
  6. package/dist/create-project.d.ts.map +1 -0
  7. package/dist/create.d.ts +4 -3
  8. package/dist/create.d.ts.map +1 -0
  9. package/dist/index.d.ts +6 -3
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +344 -187
  12. package/dist/steps.d.ts +36 -0
  13. package/dist/steps.d.ts.map +1 -0
  14. package/dist/template-engine.d.ts +3 -2
  15. package/dist/template-engine.d.ts.map +1 -0
  16. package/dist/templates/advanced/README.md +8 -4
  17. package/dist/templates/advanced/bunli.config.ts +19 -19
  18. package/dist/templates/advanced/package.json +9 -4
  19. package/dist/templates/advanced/src/commands/config.ts +129 -118
  20. package/dist/templates/advanced/src/commands/init.ts +53 -59
  21. package/dist/templates/advanced/src/commands/serve.ts +77 -82
  22. package/dist/templates/advanced/src/commands/validate.ts +58 -64
  23. package/dist/templates/advanced/src/index.ts +30 -29
  24. package/dist/templates/advanced/src/utils/config.ts +48 -47
  25. package/dist/templates/advanced/src/utils/constants.ts +6 -6
  26. package/dist/templates/advanced/src/utils/glob.ts +29 -28
  27. package/dist/templates/advanced/src/utils/validator.ts +60 -61
  28. package/dist/templates/advanced/template.json +2 -6
  29. package/dist/templates/advanced/tsconfig.json +1 -1
  30. package/dist/templates/basic/README.md +1 -1
  31. package/dist/templates/basic/bunli.config.ts +17 -17
  32. package/dist/templates/basic/package.json +4 -3
  33. package/dist/templates/basic/src/commands/hello.ts +20 -25
  34. package/dist/templates/basic/src/index.ts +9 -8
  35. package/dist/templates/basic/template.json +2 -6
  36. package/dist/templates/basic/tsconfig.json +1 -1
  37. package/dist/templates/monorepo/README.md +1 -1
  38. package/dist/templates/monorepo/bunli.config.ts +21 -21
  39. package/dist/templates/monorepo/package.json +3 -2
  40. package/dist/templates/monorepo/packages/cli/package.json +10 -5
  41. package/dist/templates/monorepo/packages/cli/src/index.ts +13 -13
  42. package/dist/templates/monorepo/packages/cli/tsconfig.json +3 -6
  43. package/dist/templates/monorepo/packages/core/package.json +6 -5
  44. package/dist/templates/monorepo/packages/core/scripts/build.ts +10 -10
  45. package/dist/templates/monorepo/packages/core/src/commands/analyze.ts +58 -56
  46. package/dist/templates/monorepo/packages/core/src/commands/process.ts +39 -46
  47. package/dist/templates/monorepo/packages/core/src/index.ts +3 -3
  48. package/dist/templates/monorepo/packages/core/src/types.ts +15 -15
  49. package/dist/templates/monorepo/packages/core/tsconfig.json +3 -5
  50. package/dist/templates/monorepo/packages/utils/package.json +6 -5
  51. package/dist/templates/monorepo/packages/utils/scripts/build.ts +10 -10
  52. package/dist/templates/monorepo/packages/utils/src/format.ts +19 -19
  53. package/dist/templates/monorepo/packages/utils/src/index.ts +3 -3
  54. package/dist/templates/monorepo/packages/utils/src/json.ts +4 -4
  55. package/dist/templates/monorepo/packages/utils/src/logger.ts +9 -9
  56. package/dist/templates/monorepo/packages/utils/tsconfig.json +2 -2
  57. package/dist/templates/monorepo/template.json +2 -6
  58. package/dist/templates/monorepo/tsconfig.json +1 -1
  59. package/dist/templates/monorepo/turbo.json +1 -1
  60. package/dist/types.d.ts +2 -1
  61. package/dist/types.d.ts.map +1 -0
  62. package/package.json +35 -34
  63. package/templates/advanced/README.md +8 -4
  64. package/templates/advanced/bunli.config.ts +19 -19
  65. package/templates/advanced/package.json +9 -4
  66. package/templates/advanced/src/commands/config.ts +129 -118
  67. package/templates/advanced/src/commands/init.ts +53 -59
  68. package/templates/advanced/src/commands/serve.ts +77 -82
  69. package/templates/advanced/src/commands/validate.ts +58 -64
  70. package/templates/advanced/src/index.ts +30 -29
  71. package/templates/advanced/src/utils/config.ts +48 -47
  72. package/templates/advanced/src/utils/constants.ts +6 -6
  73. package/templates/advanced/src/utils/glob.ts +29 -28
  74. package/templates/advanced/src/utils/validator.ts +60 -61
  75. package/templates/advanced/template.json +2 -6
  76. package/templates/advanced/tsconfig.json +1 -1
  77. package/templates/basic/README.md +1 -1
  78. package/templates/basic/bunli.config.ts +17 -17
  79. package/templates/basic/package.json +4 -3
  80. package/templates/basic/src/commands/hello.ts +20 -25
  81. package/templates/basic/src/index.ts +9 -8
  82. package/templates/basic/template.json +2 -6
  83. package/templates/basic/tsconfig.json +1 -1
  84. package/templates/monorepo/README.md +1 -1
  85. package/templates/monorepo/bunli.config.ts +21 -21
  86. package/templates/monorepo/package.json +3 -2
  87. package/templates/monorepo/packages/cli/package.json +10 -5
  88. package/templates/monorepo/packages/cli/src/index.ts +13 -13
  89. package/templates/monorepo/packages/cli/tsconfig.json +3 -6
  90. package/templates/monorepo/packages/core/package.json +6 -5
  91. package/templates/monorepo/packages/core/scripts/build.ts +10 -10
  92. package/templates/monorepo/packages/core/src/commands/analyze.ts +58 -56
  93. package/templates/monorepo/packages/core/src/commands/process.ts +39 -46
  94. package/templates/monorepo/packages/core/src/index.ts +3 -3
  95. package/templates/monorepo/packages/core/src/types.ts +15 -15
  96. package/templates/monorepo/packages/core/tsconfig.json +3 -5
  97. package/templates/monorepo/packages/utils/package.json +6 -5
  98. package/templates/monorepo/packages/utils/scripts/build.ts +10 -10
  99. package/templates/monorepo/packages/utils/src/format.ts +19 -19
  100. package/templates/monorepo/packages/utils/src/index.ts +3 -3
  101. package/templates/monorepo/packages/utils/src/json.ts +4 -4
  102. package/templates/monorepo/packages/utils/src/logger.ts +9 -9
  103. package/templates/monorepo/packages/utils/tsconfig.json +2 -2
  104. package/templates/monorepo/template.json +2 -6
  105. package/templates/monorepo/tsconfig.json +1 -1
  106. package/templates/monorepo/turbo.json +1 -1
@@ -1,38 +1,38 @@
1
- import { defineConfig } from '@bunli/core'
1
+ import { defineConfig } from "@bunli/core";
2
2
 
3
3
  export default defineConfig({
4
- name: '{{name}}',
5
- version: '{{version}}',
6
- description: '{{description}}',
7
-
4
+ name: "{{name}}",
5
+ version: "{{version}}",
6
+ description: "{{description}}",
7
+
8
8
  commands: {
9
- directory: './packages/core/src/commands'
9
+ directory: "./packages/core/src/commands",
10
10
  },
11
-
11
+
12
12
  plugins: [],
13
13
 
14
14
  build: {
15
- entry: './packages/core/src/index.ts',
16
- outdir: './packages/core/dist',
17
- targets: ['darwin-arm64', 'darwin-x64', 'linux-x64', 'windows-x64'],
15
+ entry: "./packages/core/src/index.ts",
16
+ outdir: "./packages/core/dist",
17
+ targets: ["darwin-arm64", "darwin-x64", "linux-x64", "windows-x64"],
18
18
  minify: true,
19
19
  compress: true,
20
- sourcemap: true
20
+ sourcemap: true,
21
21
  },
22
-
22
+
23
23
  dev: {
24
24
  watch: true,
25
- inspect: false
25
+ inspect: false,
26
26
  },
27
-
27
+
28
28
  test: {
29
- pattern: ['**/*.test.ts', '**/*.spec.ts'],
29
+ pattern: ["**/*.test.ts", "**/*.spec.ts"],
30
30
  coverage: true,
31
- watch: false
31
+ watch: false,
32
32
  },
33
-
33
+
34
34
  workspace: {
35
- packages: ['./packages/*'],
36
- versionStrategy: 'fixed'
37
- }
38
- })
35
+ packages: ["./packages/*"],
36
+ versionStrategy: "fixed",
37
+ },
38
+ });
@@ -2,12 +2,12 @@
2
2
  "name": "{{name}}",
3
3
  "version": "0.0.0",
4
4
  "private": true,
5
- "type": "module",
6
5
  "description": "{{description}}",
7
6
  "author": "{{author}}",
8
7
  "workspaces": [
9
8
  "packages/*"
10
9
  ],
10
+ "type": "module",
11
11
  "scripts": {
12
12
  "postinstall": "bunli generate",
13
13
  "dev": "turbo run dev",
@@ -22,8 +22,9 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@changesets/cli": "^2.27.0",
25
+ "@tsconfig/bun": "catalog:",
25
26
  "@types/bun": "latest",
26
27
  "turbo": "latest",
27
28
  "typescript": "^5.0.0"
28
29
  }
29
- }
30
+ }
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@{{name}}/cli",
3
3
  "version": "0.1.0",
4
- "type": "module",
5
4
  "description": "CLI for {{name}}",
6
- "author": "{{author}}",
7
5
  "license": "MIT",
6
+ "author": "{{author}}",
8
7
  "bin": {
9
8
  "{{name}}": "./dist/index.js"
10
9
  },
10
+ "type": "module",
11
11
  "scripts": {
12
12
  "postinstall": "bunli generate",
13
13
  "dev": "bun run src/index.ts",
14
14
  "build": "bunli build",
15
15
  "test": "bun test",
16
- "typecheck": "tsc --noEmit",
16
+ "typecheck": "tsgo --noEmit",
17
17
  "clean": "rm -rf dist"
18
18
  },
19
19
  "dependencies": {
@@ -23,6 +23,7 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@bunli/test": "latest",
26
+ "@tsconfig/bun": "catalog:",
26
27
  "@types/bun": "latest",
27
28
  "bunli": "latest",
28
29
  "typescript": "^5.0.0"
@@ -30,6 +31,10 @@
30
31
  "bunli": {
31
32
  "entry": "./src/index.ts",
32
33
  "outDir": "./dist",
33
- "external": ["@bunli/core", "@{{name}}/core", "@{{name}}/utils"]
34
+ "external": [
35
+ "@bunli/core",
36
+ "@{{name}}/core",
37
+ "@{{name}}/utils"
38
+ ]
34
39
  }
35
- }
40
+ }
@@ -1,22 +1,22 @@
1
1
  #!/usr/bin/env bun
2
- import { createCLI } from '@bunli/core'
3
- import { logger } from '@{{name}}/utils'
4
- import { processCommand, analyzeCommand } from '@{{name}}/core'
2
+ import { createCLI } from "@bunli/core";
3
+ import { processCommand, analyzeCommand } from "@{{name}}/core";
4
+ import { logger } from "@{{name}}/utils";
5
5
 
6
6
  const cli = await createCLI({
7
- name: '{{name}}',
8
- version: '0.1.0',
9
- description: '{{description}}'
10
- })
7
+ name: "{{name}}",
8
+ version: "0.1.0",
9
+ description: "{{description}}",
10
+ });
11
11
 
12
12
  // Add commands
13
- cli.command(processCommand)
14
- cli.command(analyzeCommand)
13
+ cli.command(processCommand);
14
+ cli.command(analyzeCommand);
15
15
 
16
16
  // Run CLI
17
17
  try {
18
- await cli.run()
18
+ await cli.run();
19
19
  } catch (error) {
20
- logger.error('CLI failed:', error)
21
- process.exit(1)
22
- }
20
+ logger.error("CLI failed:", error);
21
+ process.exit(1);
22
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
2
+ "extends": "@tsconfig/bun/tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "outDir": "./dist",
5
5
  "rootDir": "./src",
@@ -8,8 +8,5 @@
8
8
  },
9
9
  "include": ["src/**/*"],
10
10
  "exclude": ["node_modules", "dist", "test/**/*"],
11
- "references": [
12
- { "path": "../core" },
13
- { "path": "../utils" }
14
- ]
15
- }
11
+ "references": [{ "path": "../core" }, { "path": "../utils" }]
12
+ }
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@{{name}}/core",
3
3
  "version": "0.1.0",
4
- "type": "module",
5
4
  "description": "Core functionality for {{name}}",
6
- "author": "{{author}}",
7
5
  "license": "MIT",
6
+ "author": "{{author}}",
7
+ "type": "module",
8
8
  "main": "./dist/index.js",
9
9
  "types": "./dist/index.d.ts",
10
10
  "exports": {
@@ -14,9 +14,9 @@
14
14
  }
15
15
  },
16
16
  "scripts": {
17
- "build": "bun scripts/build.ts && bun run tsc",
17
+ "build": "bun scripts/build.ts && bun run tsgo",
18
18
  "test": "bun test",
19
- "typecheck": "tsc --noEmit",
19
+ "typecheck": "tsgo --noEmit",
20
20
  "clean": "rm -rf dist"
21
21
  },
22
22
  "dependencies": {
@@ -26,7 +26,8 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@bunli/test": "latest",
29
+ "@tsconfig/bun": "catalog:",
29
30
  "@types/bun": "latest",
30
31
  "typescript": "^5.0.0"
31
32
  }
32
- }
33
+ }
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env bun
2
- import { $ } from 'bun'
2
+ import { $ } from "bun";
3
3
 
4
4
  // Clean dist directory
5
- await $`rm -rf dist`
6
- await $`mkdir -p dist`
5
+ await $`rm -rf dist`;
6
+ await $`mkdir -p dist`;
7
7
 
8
8
  // Build TypeScript files
9
9
  await Bun.build({
10
- entrypoints: ['./src/index.ts'],
11
- outdir: './dist',
12
- target: 'bun',
13
- format: 'esm',
10
+ entrypoints: ["./src/index.ts"],
11
+ outdir: "./dist",
12
+ target: "bun",
13
+ format: "esm",
14
14
  minify: false,
15
- external: ['@bunli/core', '@{{name}}/utils', 'zod']
16
- })
15
+ external: ["@bunli/core", "@{{name}}/utils", "zod"],
16
+ });
17
17
 
18
- console.log('✅ @{{name}}/core built successfully')
18
+ console.log("✅ @{{name}}/core built successfully");
@@ -1,91 +1,93 @@
1
- import { defineCommand, option } from '@bunli/core'
2
- import { z } from 'zod'
3
- import { logger, formatTable } from '@{{name}}/utils'
4
- import type { AnalyzeResult } from '../types.js'
1
+ import { defineCommand, option } from "@bunli/core";
2
+ import { logger, formatTable } from "@{{name}}/utils";
3
+ import { z } from "zod";
4
+
5
+ import type { AnalyzeResult } from "../types.js";
5
6
 
6
7
  const analyzeCommand = defineCommand({
7
- name: 'analyze',
8
- description: 'Analyze files and generate reports',
8
+ name: "analyze",
9
+ description: "Analyze files and generate reports",
9
10
  options: {
10
- detailed: option(
11
- z.boolean().default(false),
12
- {
13
- short: 'd',
14
- description: 'Show detailed analysis'
15
- }
16
- )
11
+ detailed: option(z.boolean().default(false), {
12
+ short: "d",
13
+ description: "Show detailed analysis",
14
+ argumentKind: "flag",
15
+ }),
17
16
  },
18
17
  handler: async ({ positional, flags, colors }) => {
19
- const files = positional
18
+ const files = positional;
20
19
  if (files.length === 0) {
21
- logger.error('Usage: analyze <file...>')
22
- process.exit(1)
20
+ logger.error("Usage: analyze <file...>");
21
+ process.exit(1);
23
22
  }
24
23
 
25
- logger.info('Starting analysis...')
26
-
27
- const results: AnalyzeResult[] = []
28
-
24
+ logger.info("Starting analysis...");
25
+
26
+ const results: AnalyzeResult[] = [];
27
+
29
28
  for (const file of files) {
30
29
  try {
31
- const result = await analyzeFile(file)
32
- results.push(result)
30
+ const result = await analyzeFile(file);
31
+ results.push(result);
33
32
  } catch (error) {
34
- logger.error(`Failed to analyze ${file}:`, error)
33
+ logger.error(`Failed to analyze ${file}:`, error);
35
34
  }
36
35
  }
37
-
36
+
38
37
  // Display results
39
- console.log()
40
- console.log(colors.bold('Analysis Results:'))
41
- console.log()
42
-
43
- const tableData = results.map(r => ({
38
+ console.log();
39
+ console.log(colors.bold("Analysis Results:"));
40
+ console.log();
41
+
42
+ const tableData = results.map((r) => ({
44
43
  File: r.file,
45
44
  Lines: r.metrics.lines,
46
45
  Words: r.metrics.words,
47
- Issues: r.issues.length
48
- }))
49
-
50
- console.log(formatTable(tableData))
51
-
46
+ Issues: r.issues.length,
47
+ }));
48
+
49
+ console.log(formatTable(tableData));
50
+
52
51
  if (flags.detailed) {
53
- console.log()
54
- console.log(colors.bold('Detailed Issues:'))
55
-
52
+ console.log();
53
+ console.log(colors.bold("Detailed Issues:"));
54
+
56
55
  for (const result of results) {
57
56
  if (result.issues.length > 0) {
58
- console.log()
59
- console.log(colors.underline(result.file))
60
-
57
+ console.log();
58
+ console.log(colors.underline(result.file));
59
+
61
60
  for (const issue of result.issues) {
62
- const icon = issue.type === 'error' ? '' :
63
- issue.type === 'warning' ? '⚠' : 'ℹ'
64
- const color = issue.type === 'error' ? colors.red :
65
- issue.type === 'warning' ? colors.yellow : colors.blue
66
-
67
- console.log(color(` ${icon} ${issue.line}:${issue.column} ${issue.message}`))
61
+ const icon = issue.type === "error" ? "" : issue.type === "warning" ? "⚠" : "ℹ";
62
+ const color =
63
+ issue.type === "error"
64
+ ? colors.red
65
+ : issue.type === "warning"
66
+ ? colors.yellow
67
+ : colors.blue;
68
+
69
+ console.log(color(` ${icon} ${issue.line}:${issue.column} ${issue.message}`));
68
70
  }
69
71
  }
70
72
  }
71
73
  }
72
- }
73
- })
74
+ },
75
+ });
74
76
 
75
77
  async function analyzeFile(file: string): Promise<AnalyzeResult> {
76
- const content = await Bun.file(file).text()
77
- const lines = content.split('\n')
78
- const words = content.split(/\\s+/).filter(w => w.length > 0)
79
-
78
+ const content = await Bun.file(file).text();
79
+ const lines = content.split("\n");
80
+ const words = content.split(/\\s+/).filter((w) => w.length > 0);
81
+
80
82
  return {
81
83
  file,
82
84
  metrics: {
83
85
  lines: lines.length,
84
86
  characters: content.length,
85
- words: words.length
87
+ words: words.length,
86
88
  },
87
- issues: []
88
- }
89
+ issues: [],
90
+ };
89
91
  }
90
92
 
91
- export default analyzeCommand
93
+ export default analyzeCommand;
@@ -1,71 +1,64 @@
1
- import { defineCommand, option } from '@bunli/core'
2
- import { z } from 'zod'
3
- import { logger } from '@{{name}}/utils'
4
- import type { ProcessOptions } from '../types.js'
1
+ import { defineCommand, option } from "@bunli/core";
2
+ import { logger } from "@{{name}}/utils";
3
+ import { z } from "zod";
4
+
5
+ import type { ProcessOptions } from "../types.js";
5
6
 
6
7
  const processCommand = defineCommand({
7
- name: 'process',
8
- description: 'Process input files',
8
+ name: "process",
9
+ description: "Process input files",
9
10
  options: {
10
- output: option(
11
- z.string().optional(),
12
- {
13
- short: 'o',
14
- description: 'Output directory'
15
- }
16
- ),
17
- format: option(
18
- z.enum(['json', 'yaml', 'text']).default('json'),
19
- {
20
- short: 'f',
21
- description: 'Output format'
22
- }
23
- ),
24
- verbose: option(
25
- z.boolean().default(false),
26
- {
27
- short: 'v',
28
- description: 'Verbose output'
29
- }
30
- )
11
+ output: option(z.string().optional(), {
12
+ short: "o",
13
+ description: "Output directory",
14
+ }),
15
+ format: option(z.enum(["json", "yaml", "text"]).default("json"), {
16
+ short: "f",
17
+ description: "Output format",
18
+ }),
19
+ verbose: option(z.boolean().default(false), {
20
+ short: "v",
21
+ description: "Verbose output",
22
+ argumentKind: "flag",
23
+ }),
31
24
  },
32
25
  handler: async ({ positional, flags, spinner }) => {
33
- const files = positional
26
+ const files = positional;
34
27
  if (files.length === 0) {
35
- logger.error('Usage: process <file...>')
36
- process.exit(1)
28
+ logger.error("Usage: process <file...>");
29
+ process.exit(1);
37
30
  }
38
31
 
39
- const spin = spinner('Processing files...')
40
- spin.start()
41
-
32
+ const spin = spinner("Processing files...");
33
+ spin.start();
34
+
42
35
  try {
43
36
  for (const file of files) {
44
37
  if (flags.verbose) {
45
- logger.info(`Processing ${file}`)
38
+ logger.info(`Processing ${file}`);
46
39
  }
47
-
40
+
48
41
  // Process logic here
49
42
  await processFile(file, {
50
43
  input: file,
51
44
  output: flags.output,
52
45
  format: flags.format,
53
- verbose: flags.verbose
54
- })
46
+ verbose: flags.verbose,
47
+ });
55
48
  }
56
-
57
- spin.succeed(`Processed ${files.length} files`)
49
+
50
+ spin.succeed(`Processed ${files.length} files`);
58
51
  } catch (error) {
59
- spin.fail('Processing failed')
60
- logger.error(error)
61
- process.exit(1)
52
+ spin.fail("Processing failed");
53
+ logger.error(error);
54
+ process.exit(1);
62
55
  }
63
- }
64
- })
56
+ },
57
+ });
65
58
 
66
59
  async function processFile(file: string, options: ProcessOptions): Promise<void> {
67
60
  // Implementation here
68
- logger.debug(`Processing ${file} with options:`, options)
61
+ logger.debug(`Processing ${file} with options:`, options);
69
62
  }
70
63
 
71
- export default processCommand
64
+ export default processCommand;
@@ -1,3 +1,3 @@
1
- export { default as processCommand } from './commands/process.js'
2
- export { default as analyzeCommand } from './commands/analyze.js'
3
- export type { ProcessOptions, AnalyzeResult } from './types.js'
1
+ export { default as processCommand } from "./commands/process.js";
2
+ export { default as analyzeCommand } from "./commands/analyze.js";
3
+ export type { ProcessOptions, AnalyzeResult } from "./types.js";
@@ -1,21 +1,21 @@
1
1
  export interface ProcessOptions {
2
- input: string
3
- output?: string
4
- format?: 'json' | 'yaml' | 'text'
5
- verbose?: boolean
2
+ input: string;
3
+ output?: string;
4
+ format?: "json" | "yaml" | "text";
5
+ verbose?: boolean;
6
6
  }
7
7
 
8
8
  export interface AnalyzeResult {
9
- file: string
9
+ file: string;
10
10
  metrics: {
11
- lines: number
12
- characters: number
13
- words: number
14
- }
11
+ lines: number;
12
+ characters: number;
13
+ words: number;
14
+ };
15
15
  issues: Array<{
16
- type: 'error' | 'warning' | 'info'
17
- line: number
18
- column: number
19
- message: string
20
- }>
21
- }
16
+ type: "error" | "warning" | "info";
17
+ line: number;
18
+ column: number;
19
+ message: string;
20
+ }>;
21
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
2
+ "extends": "@tsconfig/bun/tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "outDir": "./dist",
5
5
  "rootDir": "./src",
@@ -9,7 +9,5 @@
9
9
  },
10
10
  "include": ["src/**/*"],
11
11
  "exclude": ["node_modules", "dist", "test/**/*"],
12
- "references": [
13
- { "path": "../utils" }
14
- ]
15
- }
12
+ "references": [{ "path": "../utils" }]
13
+ }
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@{{name}}/utils",
3
3
  "version": "0.1.0",
4
- "type": "module",
5
4
  "description": "Shared utilities for {{name}}",
6
- "author": "{{author}}",
7
5
  "license": "MIT",
6
+ "author": "{{author}}",
7
+ "type": "module",
8
8
  "main": "./dist/index.js",
9
9
  "types": "./dist/index.d.ts",
10
10
  "exports": {
@@ -14,13 +14,14 @@
14
14
  }
15
15
  },
16
16
  "scripts": {
17
- "build": "bun scripts/build.ts && bun run tsc",
17
+ "build": "bun scripts/build.ts && bun run tsgo",
18
18
  "test": "bun test",
19
- "typecheck": "tsc --noEmit",
19
+ "typecheck": "tsgo --noEmit",
20
20
  "clean": "rm -rf dist"
21
21
  },
22
22
  "devDependencies": {
23
+ "@tsconfig/bun": "catalog:",
23
24
  "@types/bun": "latest",
24
25
  "typescript": "^5.0.0"
25
26
  }
26
- }
27
+ }
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env bun
2
- import { $ } from 'bun'
2
+ import { $ } from "bun";
3
3
 
4
4
  // Clean dist directory
5
- await $`rm -rf dist`
6
- await $`mkdir -p dist`
5
+ await $`rm -rf dist`;
6
+ await $`mkdir -p dist`;
7
7
 
8
8
  // Build TypeScript files
9
9
  await Bun.build({
10
- entrypoints: ['./src/index.ts'],
11
- outdir: './dist',
12
- target: 'bun',
13
- format: 'esm',
14
- minify: false
15
- })
10
+ entrypoints: ["./src/index.ts"],
11
+ outdir: "./dist",
12
+ target: "bun",
13
+ format: "esm",
14
+ minify: false,
15
+ });
16
16
 
17
- console.log('✅ @{{name}}/utils built successfully')
17
+ console.log("✅ @{{name}}/utils built successfully");