withframe 0.0.1
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/README.md +93 -0
- package/dist/index.mjs +1756 -0
- package/package.json +69 -0
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://withfra.me">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/WithFrame/withframe-npx/main/assets/logo.full.png" alt="WithFrame" width="420" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">Withframe</h1>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
CLI for adding and uploading WithFrame components in React Native / Expo projects.
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- Add components from WithFrame registry to your project
|
|
16
|
+
- Upload component drafts to the registry
|
|
17
|
+
- Upload screenshots and attach them to collections
|
|
18
|
+
- Device login flow for CLI auth
|
|
19
|
+
- Local project config via `withframe.config.json`
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
Use directly with `npx`:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx withframe@latest --help
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or install globally:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm i -g withframe
|
|
33
|
+
withframe --help
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
1. Initialize config (optional but recommended):
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx withframe init
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
2. Login:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx withframe login
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
3. Set token in one of two ways:
|
|
51
|
+
|
|
52
|
+
Option A: export in shell
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
export WITHFRAME_TOKEN="wf_..."
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Option B: save in project `.env` or `.env.local`
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
WITHFRAME_TOKEN="wf_..."
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
4. Add a component:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npx withframe add button
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Commands
|
|
71
|
+
|
|
72
|
+
- `withframe init` - create/update `withframe.config.json`
|
|
73
|
+
- `withframe login` - start device auth flow
|
|
74
|
+
- `withframe logout` - clear local auth token file
|
|
75
|
+
- `withframe add <component>` - add component files to project
|
|
76
|
+
- `withframe upload` - upload component draft to registry
|
|
77
|
+
- `withframe shot --file <path>` - upload screenshot
|
|
78
|
+
|
|
79
|
+
Run `withframe <command> --help` for command options.
|
|
80
|
+
|
|
81
|
+
## Configuration
|
|
82
|
+
|
|
83
|
+
`withframe.config.json`:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"outputDir": "src/components",
|
|
88
|
+
"target": "react_native"
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
- `outputDir` - where generated files are written
|
|
93
|
+
- `target` - `react_native` or `expo`
|