Skip to content

Commit 4d80e45

Browse files
NovinyCompuIves
authored andcommitted
add codesandboxer-fs docs (#2886)
* add codesandboxer-fs docs * Update 2-importing.md * Update packages/homepage/content/docs/2-importing.md Co-Authored-By: Ives van Hoorne <Ives.v.h@gmail.com>
1 parent 771716c commit 4d80e45

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/homepage/content/docs/2-importing.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,22 @@ example sandbox of that is here:
172172

173173
<iframe src="https://codesandbox.io/embed/9loovqj5oy?editorsize=70&fontsize=14&hidenavigation=1&runonclick=1" style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;" sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>
174174

175+
## Import single Component as a Sandbox
176+
177+
You can export a local component to CodeSandbox by using our other
178+
[CLI](https://github.com/codesandbox/codesandboxer/tree/master/packages/codesandboxer-fs).
179+
180+
You can install our CLI by running `npm install -g codesandboxer-fs`. Then you can
181+
export a project by running `codesandboxer {filePath}`.
182+
183+
```
184+
$ npm install -g codesandboxer-fs
185+
$ codesandboxer docs/examples/my-single-component.js
186+
```
187+
188+
This will print out the id of a sandbox that does nothing but render the targeted component, along with a link to that sandbox. This will also bundle in other local files used by the component to ensure render.
189+
190+
175191
## Import Using React-Codesandboxer
176192

177193
Import from a single file from a git repository, along with supplemental files

0 commit comments

Comments
 (0)