create-foldkit-app 0.1.1 → 0.1.3
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/commands/create.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command, FileSystem, Path } from '@effect/platform';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
|
-
import { Console, Effect } from 'effect';
|
|
3
|
+
import { Console, Effect, Match } from 'effect';
|
|
4
4
|
import { createProject } from '../utils/files.js';
|
|
5
5
|
import { installDependencies } from '../utils/packages.js';
|
|
6
6
|
const validateProject = (name, projectPath, packageManager) => Effect.gen(function* () {
|
|
@@ -25,12 +25,13 @@ const installProjectDependencies = (projectPath, packageManager) => Effect.gen(f
|
|
|
25
25
|
yield* Console.log(chalk.green('✅ Dependencies installed'));
|
|
26
26
|
yield* Console.log('');
|
|
27
27
|
});
|
|
28
|
+
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);
|
|
28
29
|
const displaySuccessMessage = (name, packageManager) => Effect.gen(function* () {
|
|
29
30
|
yield* Console.log(chalk.bold('🎉 Success! Your Foldkit app is ready.'));
|
|
30
31
|
yield* Console.log('');
|
|
31
32
|
yield* Console.log('Next steps:');
|
|
32
33
|
yield* Console.log(` ${chalk.cyan('cd')} ${name}`);
|
|
33
|
-
yield* Console.log(` ${chalk.cyan(
|
|
34
|
+
yield* Console.log(` ${chalk.cyan(runDevServerCommand(packageManager))}`);
|
|
34
35
|
yield* Console.log('');
|
|
35
36
|
yield* Console.log('Happy coding! 🎨');
|
|
36
37
|
});
|
package/dist/utils/packages.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Effect, Match, pipe } from 'effect';
|
|
|
3
3
|
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));
|
|
4
4
|
export const installDependencies = (projectPath, packageManager) => Effect.gen(function* () {
|
|
5
5
|
const installArgs = getInstallArgs(packageManager);
|
|
6
|
-
const installDeps = Command.make(packageManager, ...installArgs, 'foldkit@0.1.0-canary.
|
|
6
|
+
const installDeps = Command.make(packageManager, ...installArgs, 'foldkit@0.1.0-canary.10', '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
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'));
|