skeletonlabs / create-skeleton-app

CLI installer for Skeleton apps and monorepo for the sites that form the templates
16 stars 5 forks source link

Allow installation into existing directories #32

Closed MLNW closed 1 year ago

MLNW commented 1 year ago

It's not possible to use the CLI to install Skeleton into an existing directory. It also only complains after asking all of the questions ...

I would propose to allow installation into an existing directory. E.g., an empty directory only containing a .git folder. At the very least it should check first if the directory exists and fail early.

❯ pnpm create skeleton-app@latest .                                                                  13:44:20  
.../share/pnpm/store/v3/tmp/dlx-2687     |  +37 ++++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/dev/.local/share/pnpm/store/v3
  Virtual store is at:             ../../.local/share/pnpm/store/v3/tmp/dlx-2687/node_modules/.pnpm
.../share/pnpm/store/v3/tmp/dlx-2687     | Progress: resolved 37, reused 37, downloaded 0, added 37, done
┌  Create Skeleton App (version 0.0.38)

Welcome to Skeleton 💀! A UI toolkit for Svelte + Tailwind

Problems? Open an issue on https://github.com/skeletonlabs/skeleton/issues if none exists already.
│
◇  Add type checking with TypeScript?
│  Yes, using TypeScript syntax
│
◇  Add ESLint for code linting?
│  Yes
│
◇  Add Prettier for code formatting ?
│  Yes
│
◇  Add Playwright for browser testing ?
│  Yes
│
◇  Add Vitest for unit testing ?
│  Yes
│
◇  Install component dependencies:
│  CodeBlock (installs highlight.js), Popups (installs floating-ui)
│
◇  Pick tailwind plugins to add:
│  forms, typography
│
◇  Select a theme:
│  Gold Nouveau
│
◇  Which Skeleton app template?
│  Bare Bones
│
○  Installing
Install directory already exists!
endigo9740 commented 1 year ago

@niktek I believe you mentioned this was possible, correct? That looks like the format suggested to accomplish this.

Sarenor commented 1 year ago

It does, which is why I sent him over to here. Especially because it happens while using pnpm.

niktek commented 1 year ago

Added more robust file checking for problematic files, moved the checks to the beginning before the prompts.

MLNW commented 1 year ago

Is it now possible to create a new project in a folder that already exists?