create-foldkit-app 0.1.6 → 0.2.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/dist/index.js CHANGED
@@ -15,6 +15,7 @@ const example = Options.choice('example', [
15
15
  'snake',
16
16
  'routing',
17
17
  'shopping-cart',
18
+ 'websocket-chat',
18
19
  ]).pipe(Options.withAlias('e'), Options.withDescription("The example application to start from. Pick an example that's similar to the application you're building. Or create multiple projects and take pieces of each!\n\n" +
19
20
  'Available examples:\n' +
20
21
  ' counter - Simple increment/decrement with reset\n' +
@@ -24,7 +25,8 @@ const example = Options.choice('example', [
24
25
  ' form - Form validation with async email checking\n' +
25
26
  ' snake - Classic game built with command streams\n' +
26
27
  ' routing - URL routing with parser combinators and route parameters\n' +
27
- ' shopping-cart - Complex state management with nested models and routing'));
28
+ ' shopping-cart - Complex state management with nested models and routing\n' +
29
+ ' websocket-chat - WebSocket integration'));
28
30
  const packageManager = Options.choice('package-manager', ['pnpm', 'npm', 'yarn']).pipe(Options.withAlias('p'), Options.withDescription('The package manager to use for installing dependencies'));
29
31
  const create = Command.make('create', {
30
32
  name,
@@ -33,7 +35,7 @@ const create = Command.make('create', {
33
35
  }, create_);
34
36
  const cli = Command.run(create, {
35
37
  name: 'Create Foldkit App',
36
- version: '0.1.6',
38
+ version: '0.2.1',
37
39
  summary: HelpDoc.getSpan(HelpDoc.p('Create a new Foldkit application')),
38
40
  });
39
41
  cli(process.argv).pipe(Effect.provide([FetchHttpClient.layer, NodeContext.layer]), NodeRuntime.runMain);
@@ -38,7 +38,8 @@ const createBaseFiles = (projectPath) => Effect.gen(function* () {
38
38
  yield* fs.makeDirectory(projectPath, { recursive: true });
39
39
  const baseFiles = yield* getBaseFiles;
40
40
  yield* pipe(baseFiles, Record.toEntries, Effect.forEach(([filePath, content]) => Effect.gen(function* () {
41
- const fullPath = path.join(projectPath, filePath);
41
+ const targetPath = filePath === 'gitignore' ? '.gitignore' : filePath;
42
+ const fullPath = path.join(projectPath, targetPath);
42
43
  const dirPath = path.dirname(fullPath);
43
44
  yield* fs.makeDirectory(dirPath, { recursive: true });
44
45
  yield* fs.writeFileString(fullPath, content);
@@ -6,6 +6,6 @@ export const installDependencies = (projectPath, packageManager) => Effect.gen(f
6
6
  const installDeps = Command.make(packageManager, ...installArgs, 'foldkit', 'effect@^3.18.2', '@tailwindcss/vite@^4.1.10', 'tailwindcss@^4.1.10').pipe(Command.workingDirectory(projectPath), Command.stdout('inherit'), Command.stderr('inherit'));
7
7
  yield* Command.exitCode(installDeps);
8
8
  const installDevArgs = getInstallArgs(packageManager, true);
9
- const installDevDeps = Command.make(packageManager, ...installDevArgs, '@foldkit/vite-plugin@0.2.0', 'vite@^7.1.9', 'typescript@^5.9.3', 'prettier@^3.6.2', '@trivago/prettier-plugin-sort-imports@^5.2.2').pipe(Command.workingDirectory(projectPath), Command.stdout('inherit'), Command.stderr('inherit'));
9
+ const installDevDeps = Command.make(packageManager, ...installDevArgs, '@foldkit/vite-plugin@0.2.0', 'vite@^7.1.9', 'typescript@^5.9.3', 'prettier@^3.6.2', '@trivago/prettier-plugin-sort-imports@^5.2.2', 'eslint@^9.37.0', '@eslint/js@^9.37.0', '@typescript-eslint/eslint-plugin@^8.45.0', '@typescript-eslint/parser@^8.45.0').pipe(Command.workingDirectory(projectPath), Command.stdout('inherit'), Command.stderr('inherit'));
10
10
  yield* Command.exitCode(installDevDeps);
11
11
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-foldkit-app",
3
- "version": "0.1.6",
3
+ "version": "0.2.1",
4
4
  "description": "Create Foldkit applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,48 @@
1
+ import js from '@eslint/js'
2
+ import tsPlugin from '@typescript-eslint/eslint-plugin'
3
+ import tsParser from '@typescript-eslint/parser'
4
+
5
+ export default [
6
+ {
7
+ ...js.configs.recommended,
8
+ files: ['**/*.ts', '**/*.js'],
9
+ languageOptions: {
10
+ parser: tsParser,
11
+ parserOptions: {
12
+ ecmaVersion: 'latest',
13
+ sourceType: 'module',
14
+ },
15
+ },
16
+ plugins: {
17
+ '@typescript-eslint': tsPlugin,
18
+ },
19
+ rules: {
20
+ 'no-redeclare': 'off',
21
+ 'no-undef': 'off',
22
+ 'no-unused-vars': 'off',
23
+ '@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
24
+ '@typescript-eslint/no-explicit-any': 'error',
25
+ '@typescript-eslint/no-unused-vars': [
26
+ 'error',
27
+ {
28
+ argsIgnorePattern: '^_',
29
+ varsIgnorePattern: '^_',
30
+ caughtErrorsIgnorePattern: '^_',
31
+ destructuredArrayIgnorePattern: '^_',
32
+ },
33
+ ],
34
+ },
35
+ },
36
+
37
+ {
38
+ ignores: [
39
+ 'dist/',
40
+ 'node_modules/',
41
+ '**/*.d.ts',
42
+ 'eslint.config.mjs',
43
+ 'vite.config.ts',
44
+ '**/*.config.js',
45
+ '**/*.config.mjs',
46
+ ],
47
+ },
48
+ ]
@@ -0,0 +1,28 @@
1
+ # Dependencies
2
+ node_modules/
3
+ pnpm-lock.yaml
4
+ yarn.lock
5
+ package-lock.json
6
+
7
+ # Build outputs
8
+ dist/
9
+ build/
10
+
11
+ # Environment variables
12
+ .env
13
+ .env.*
14
+ .env.local
15
+ .env.*.local
16
+
17
+ # IDE
18
+ .vscode/
19
+ .idea/
20
+ *.swp
21
+ *.swo
22
+
23
+ # OS
24
+ .DS_Store
25
+ Thumbs.db
26
+
27
+ # TypeScript
28
+ *.tsbuildinfo
@@ -7,6 +7,7 @@
7
7
  "build": "vite build",
8
8
  "preview": "vite preview",
9
9
  "typecheck": "tsc --noEmit",
10
- "format": "prettier -w ."
10
+ "format": "prettier -w .",
11
+ "lint": "eslint ."
11
12
  }
12
13
  }