create-skaff 0.0.1 → 0.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-skaff",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Interactive Next.js project scaffolder: Tailwind, shadcn/ui, Motion, Lucide, Oxlint, Oxfmt, Ultracite, Claude and Codex config",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,7 +12,8 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "dev": "bun src/index.tsx",
15
- "typecheck": "tsc --noEmit"
15
+ "typecheck": "tsc --noEmit",
16
+ "release": "bun run typecheck && npm version patch --no-git-tag-version && npm publish --access public"
16
17
  },
17
18
  "engines": {
18
19
  "bun": ">=1.3.0"
@@ -1,5 +1,5 @@
1
1
  import type { ScaffoldConfig } from "../lib/scaffold-steps";
2
- import { scaffoldSteps } from "../lib/scaffold-steps";
2
+ import { projectDir, scaffoldSteps } from "../lib/scaffold-steps";
3
3
 
4
4
  type ConfirmStepProps = { config: ScaffoldConfig };
5
5
 
@@ -17,7 +17,7 @@ export function ConfirmStep({ config }: ConfirmStepProps) {
17
17
  package manager: <span fg="#7dd3fc">{config.packageManager}</span>
18
18
  </text>
19
19
  <text>
20
- directory: <span fg="#7dd3fc">{`${config.cwd}/${config.name}`}</span>
20
+ directory: <span fg="#7dd3fc">{projectDir(config)}</span>
21
21
  </text>
22
22
  </box>
23
23
  <box flexDirection="column">
@@ -5,7 +5,7 @@ type NameStepProps = { initialValue: string; onSubmit: (name: string) => void };
5
5
  export function NameStep({ initialValue, onSubmit }: NameStepProps) {
6
6
  const [value, setValue] = useState(initialValue);
7
7
  const name = value.trim();
8
- const valid = /^[a-z0-9][a-z0-9._-]*$/.test(name);
8
+ const valid = name === "." || /^[a-z0-9][a-z0-9._-]*$/.test(name);
9
9
  return (
10
10
  <box flexDirection="column" gap={1}>
11
11
  <text>
@@ -24,7 +24,7 @@ export function NameStep({ initialValue, onSubmit }: NameStepProps) {
24
24
  }}
25
25
  />
26
26
  </box>
27
- <text fg="#888888">lowercase letters, numbers, dots, dashes · Enter to continue</text>
27
+ <text fg="#888888">lowercase letters, numbers, dots, dashes, or . for the current directory · Enter to continue</text>
28
28
  </box>
29
29
  );
30
30
  }
@@ -30,7 +30,7 @@ export function ProgressStep({ config, onExit }: ProgressStepProps) {
30
30
  {finished && !error ? (
31
31
  <box flexDirection="column">
32
32
  <text fg="#4ade80">Next steps:</text>
33
- <text>{` cd ${config.name}`}</text>
33
+ {config.name === "." ? null : <text>{` cd ${config.name}`}</text>}
34
34
  <text>{` ${config.packageManager} run dev`}</text>
35
35
  </box>
36
36
  ) : null}
@@ -11,7 +11,7 @@ export type ScaffoldStep = {
11
11
  run: (config: ScaffoldConfig, onOutput: (line: string) => void) => Promise<CommandResult>;
12
12
  };
13
13
 
14
- const projectDir = (config: ScaffoldConfig) => join(config.cwd, config.name);
14
+ export const projectDir = (config: ScaffoldConfig) => (config.name === "." ? config.cwd : join(config.cwd, config.name));
15
15
 
16
16
  const command =
17
17
  (build: (config: ScaffoldConfig) => string[], inProject = true): ScaffoldStep["run"] =>