Skip to content

Commit 1bf57ee

Browse files
committed
command doc update
1 parent fe67a54 commit 1bf57ee

File tree

14 files changed

+32
-26
lines changed

14 files changed

+32
-26
lines changed

.github/ISSUE_TEMPLATE/component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ assignees: ''
4747
- [ ] `packages/cli/templates/<component-name>/styles.ts.template`
4848
- [ ] Update CLI dependencies if needed
4949
- [ ] Test component addition via CLI
50-
- [ ] `npx nativecn add <component-name>`
50+
- [ ] `npx @nativecn/cli add <component-name>`
5151

5252
## Documentation Requirements
5353

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ npm run build
5555
npm link
5656

5757
# Now you can run the CLI locally
58-
npx nativecn init
59-
npx nativecn add button
58+
npx @nativecn/cli init
59+
npx @nativecn/cli add button
6060
```
6161

6262
5. **Alternatively, link individual packages**
@@ -184,7 +184,7 @@ The recommended workflow is to test your components in our provided example apps
184184

185185
4. Now you can test your new component:
186186
```bash
187-
npx nativecn add your-new-component
187+
npx @nativecn/cli add your-new-component
188188
```
189189

190190
#### Method 2: Using npm link (Easier Workflow)
@@ -212,7 +212,7 @@ The recommended workflow is to test your components in our provided example apps
212212
4. Test your new component:
213213

214214
```bash
215-
npx nativecn add your-new-component
215+
npx @nativecn/cli add your-new-component
216216
```
217217

218218
5. When finished testing, unlink the package:
@@ -238,7 +238,7 @@ The recommended workflow is to test your components in our provided example apps
238238

239239
3. Test your new component:
240240
```bash
241-
npx nativecn add your-new-component
241+
npx @nativecn/cli add your-new-component
242242
```
243243

244244
Remember to rebuild the CLI package after making changes to component templates!

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ npx @nativecn/cli [command]
2424
### Initialize NativeCN in your project
2525

2626
```bash
27-
npx nativecn init
27+
npx @nativecn/cli init
2828
```
2929

3030
The init command will:
@@ -38,7 +38,7 @@ The init command will:
3838
### Add components to your project
3939

4040
```bash
41-
npx nativecn add button
41+
npx @nativecn/cli add button
4242
```
4343

4444
Options:
@@ -48,7 +48,7 @@ Options:
4848

4949
### Generate theme preset file (optional)
5050

51-
This is asked to be done automatically when you run `npx nativecn init`. Use this if you want a more fine-grained control over the preset file.
51+
This is asked to be done automatically when you run `npx @nativecn/cli init`. Use this if you want a more fine-grained control over the preset file.
5252

5353
```bash
5454
npx nativecn preset
@@ -103,8 +103,8 @@ npm run build
103103
npm link
104104

105105
# Now you can run the CLI
106-
npx nativecn init
107-
npx nativecn add button
106+
npx @nativecn/cli init
107+
npx @nativecn/cli add button
108108
```
109109

110110
### Alternatively, you can link individual packages
@@ -114,8 +114,8 @@ npx nativecn add button
114114
npm link @nativecn/cli @nativecn/components
115115

116116
# Run commands
117-
npx nativecn init
118-
npx nativecn add button
117+
npx @nativecn/cli init
118+
npx @nativecn/cli add button
119119
```
120120

121121
## Contributing

docs/pages/components/accordion.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The Accordion component provides an expandable/collapsible content container.
1616

1717
<ComponentCode
1818
language="bash"
19-
code="npx nativecn add accordion"
19+
code="npx @nativecn/cli add accordion"
2020
title="Installation Command"
2121
/>
2222

docs/pages/components/alert-dialog.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The Alert Dialog component provides a modal dialog that interrupts the user with
1717

1818
<ComponentCode
1919
language="bash"
20-
code="npx nativecn add alert-dialog"
20+
code="npx @nativecn/cli add alert-dialog"
2121
title="Installation Command"
2222
/>
2323

docs/pages/components/alert.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The Alert component provides contextual feedback messages for typical user actio
5757

5858
<ComponentCode
5959
language="bash"
60-
code="npx nativecn add alert"
60+
code="npx @nativecn/cli add alert"
6161
title="Installation Command"
6262
/>
6363

docs/pages/components/avatar.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The Avatar component is used to display user profile pictures with fallback supp
2626

2727
<ComponentCode
2828
language="bash"
29-
code="npx nativecn add avatar"
29+
code="npx @nativecn/cli add avatar"
3030
title="Installation Command"
3131
/>
3232

docs/pages/components/button.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The Button component is a versatile UI element designed for user interactions.
1616

1717
<ComponentCode
1818
language="bash"
19-
code="npx nativecn add button"
19+
code="npx @nativecn/cli add button"
2020
title="Installation Command"
2121
/>
2222

docs/pages/getting-started.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ NativeCN provides a convenient CLI to help you get started quickly:
2020

2121
<ComponentCode
2222
language="bash"
23-
code="npx nativecn init"
23+
code="npx @nativecn/cli init"
2424
title="Init Command"
2525
/>
2626

@@ -35,7 +35,7 @@ The `init` command:
3535

3636
<ComponentCode
3737
language="bash"
38-
code="npx nativecn add button card input"
38+
code="npx @nativecn/cli add button card input"
3939
title="Add Components Command"
4040
/>
4141

examples/expo/nativecn/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ npm i ../../../packages/cli
2828
Then, run the following command to test a component:
2929

3030
```bash
31-
npx nativecn add <component-name>
31+
npx @nativecn/cli add <component-name>
3232
```
3333

3434
For example, to test the Button component, run the following command:
3535

3636
```bash
37-
npx nativecn add button
37+
npx @nativecn/cli add button
3838
```
3939

4040
This will add the Button component to the app, after which you can run the app and create a test tsx file to see the component in action.

0 commit comments

Comments
 (0)