Skip to content

Commit 59344f8

Browse files
committed
docs: document using @solid-cli/create as a library
1 parent 558ae8c commit 59344f8

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

packages/create/README.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
1-
---
2-
description: Create Solid apps in one command with create-solid.
3-
---
1+
# @solid-cli/create
42

5-
# Create Solid
3+
A library for easily initialising Solid projects
64

7-
The easiest way to get started with Solid is by using `create-solid`. This CLI tool enables you to quickly start building a new Solid application, with everything set up for you. You can create a new app using the default SolidStart template or use one of the [Official SolidStart Examples](https://github.com/solidjs/solid-start/tree/main/examples). To get started, use the following command:
5+
## Usage
86

9-
```bash
10-
#or
11-
npm init solid@latest
7+
### Initialising a Vanilla project
128

13-
#or
14-
pnpm create solid@latest
9+
```ts
10+
import { createVanilla } from "@solid-cli/create";
11+
createVanilla({ template: "ts", destination: "./ts" });
12+
```
1513

16-
# or
17-
yarn create solid
14+
### Initialising a Start project
1815

19-
# or
20-
bunx create-solid
16+
```ts
17+
import { createStart } from "@solid-cli/create";
18+
createStart({ template: "basic", destination: "./basic" });
2119
```
2220

23-
## Why use Create Solid?
24-
25-
`create-solid` allows you to create a new Solid app within seconds. It includes a number of benefits:
21+
### Initialising a Library project
2622

27-
- **Interactive Experience**: Running `npm init solid@latest` (with no arguments) launches an interactive experience that guides you through setting up a project.
28-
- **Zero Dependencies**: Initializing a project is as quick as one second. Create Solid has zero runtime dependencies.
29-
- **Support for Examples**: Create Solid App can bootstrap your application using an example from the SolidStart official examples collection.
23+
```ts
24+
import { createLibrary } from "@solid-cli/create";
25+
createLibrary({ destination: "./library-project" });
26+
```

0 commit comments

Comments
 (0)