create-foldkit-app 0.10.4 → 0.12.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
@@ -10,6 +10,8 @@ npx create-foldkit-app
10
10
  pnpm create foldkit-app
11
11
  # or
12
12
  yarn create foldkit-app
13
+ # or
14
+ bun create foldkit-app
13
15
  ```
14
16
 
15
17
  The CLI prompts you for a project name, starter example, and package manager. Pass `--name`, `--example`, and/or `--package-manager` to skip the matching prompts.
@@ -28,6 +28,7 @@ const promptForPackageManager = Prompt.select({
28
28
  { value: 'pnpm', title: 'pnpm' },
29
29
  { value: 'npm', title: 'npm' },
30
30
  { value: 'yarn', title: 'yarn' },
31
+ { value: 'bun', title: 'bun' },
31
32
  ],
32
33
  });
33
34
  const resolveInput = (input) => Effect.gen(function* () {
@@ -72,7 +73,7 @@ const installProjectDependencies = (projectPath, packageManager, example) => Eff
72
73
  yield* Console.log(chalk.green('✅ Dependencies installed'));
73
74
  yield* Console.log('');
74
75
  });
75
- const runDevServerCommand = (packageManager) => Match.value(packageManager).pipe(Match.when('pnpm', () => 'pnpm dev'), Match.when('npm', () => 'npm run dev'), Match.when('yarn', () => 'yarn dev'), Match.exhaustive);
76
+ const runDevServerCommand = (packageManager) => Match.value(packageManager).pipe(Match.when('pnpm', () => 'pnpm dev'), Match.when('npm', () => 'npm run dev'), Match.when('yarn', () => 'yarn dev'), Match.when('bun', () => 'bun dev'), Match.exhaustive);
76
77
  const displaySuccessMessage = (name, packageManager) => Effect.gen(function* () {
77
78
  yield* Console.log(chalk.bold('All systems nominal.'));
78
79
  yield* Console.log('');
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ const packageManager = Flag.choice('package-manager', [
19
19
  'pnpm',
20
20
  'npm',
21
21
  'yarn',
22
+ 'bun',
22
23
  ]).pipe(Flag.withAlias('p'), Flag.withDescription('The package manager to use for installing dependencies'), Flag.optional);
23
24
  const create = Command.make('create', {
24
25
  name,
@@ -3,7 +3,7 @@ import { HttpClient, HttpClientRequest } from 'effect/unstable/http';
3
3
  import { spawn } from 'node:child_process';
4
4
  const GITHUB_RAW_BASE_URL = 'https://raw.githubusercontent.com/foldkit/foldkit/main/examples';
5
5
  const isWindows = process.platform === 'win32';
6
- const getInstallArgs = (packageManager, isDev = false) => pipe(Match.value(packageManager), Match.when('npm', () => ['install']), Match.when('yarn', () => ['add']), Match.when('pnpm', () => ['add']), Match.exhaustive, args => (isDev ? [...args, '-D'] : args));
6
+ const getInstallArgs = (packageManager, isDev = false) => pipe(Match.value(packageManager), Match.when('npm', () => ['install']), Match.when('yarn', () => ['add']), Match.when('pnpm', () => ['add']), Match.when('bun', () => ['add']), Match.exhaustive, args => (isDev ? [...args, '-D'] : args));
7
7
  const StringRecord = Schema.Record(Schema.String, Schema.String);
8
8
  const PackageJson = Schema.Struct({
9
9
  dependencies: StringRecord.pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-foldkit-app",
3
- "version": "0.10.4",
3
+ "version": "0.12.0",
4
4
  "description": "Create Foldkit applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -12,10 +12,10 @@
12
12
  "templates"
13
13
  ],
14
14
  "dependencies": {
15
- "@effect/platform-node": "4.0.0-beta.64",
16
- "@effect/platform-node-shared": "4.0.0-beta.64",
15
+ "@effect/platform-node": "4.0.0-beta.66",
16
+ "@effect/platform-node-shared": "4.0.0-beta.66",
17
17
  "chalk": "^5.6.2",
18
- "effect": "4.0.0-beta.64",
18
+ "effect": "4.0.0-beta.66",
19
19
  "rimraf": "^6.1.3",
20
20
  "typescript": "^6.0.3"
21
21
  },