create-forkly 0.6.1 → 0.6.2

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 (2) hide show
  1. package/dist/index.js +10 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -29,12 +29,15 @@ const cli = cac('forkly');
29
29
  cli.command('create [dir]', 'Create a new Forkly project')
30
30
  .action(async (dir = '.') => {
31
31
  p.intro('Forkly Project Scaffolder');
32
- const projectName = await p.text({
33
- message: 'Project name:',
34
- placeholder: 'my-forkly-app',
35
- defaultValue: dir === '.' ? 'my-forkly-app' : dir,
36
- });
37
- if (p.isCancel(projectName)) {
32
+ const specifiedDir = dir !== '.';
33
+ const projectName = specifiedDir
34
+ ? dir
35
+ : await p.text({
36
+ message: 'Project name:',
37
+ placeholder: 'my-forkly-app',
38
+ defaultValue: 'my-forkly-app',
39
+ });
40
+ if (!specifiedDir && p.isCancel(projectName)) {
38
41
  p.cancel('Cancelled');
39
42
  process.exit(0);
40
43
  }
@@ -82,5 +85,5 @@ cli.command('create [dir]', 'Create a new Forkly project')
82
85
  p.outro(`Done! Run:\n cd ${projectName}\n ${devCmd}`);
83
86
  });
84
87
  cli.help();
85
- cli.version('0.6.1');
88
+ cli.version('0.6.2');
86
89
  cli.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-forkly",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "CLI to scaffold a new Forkly project",
5
5
  "type": "module",
6
6
  "bin": {