Skip to content

Commit 993ab4a

Browse files
authored
Update FormsReadme.md
1 parent a5a3644 commit 993ab4a

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

Documentation/FormsReadme.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,26 @@ Once you are set up with the code, take a look at some examples over at [solid-u
4141

4242
Most interesting may be how it is all wired together in the [test-form.js](https://github.com/SolidOS/solid-ui/blob/main/Documentation/form-examples/test-form.js), while the code for the form itself is mostly under [solid-ui/src/widgets/forms.js](https://github.com/SolidOS/solid-ui/blob/main/src/widgets/forms.js).
4343

44-
Locally you can take advantage of that.
44+
## Running or testing it locally
45+
46+
Locally you can setup your own test of forms. All you need is the `/Documentation/form-examples` folders and the `test-form.js`.
47+
48+
1. First build solid-ui locally and copy it to `/Documentation/form-examples`
49+
Run this instruction which will do all that for you.
4550
```
4651
npm run build-form-examples
4752
```
48-
and then you need to use the new build main.js by uncommenting the usage of teh script for example on line: https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L21 and commenting out the line: https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L15
53+
2. Use the newly build solid-ui (called main.js) in your html.
54+
You need to use the new build main.js:
55+
* uncommenting the usage of the main.js script; Example [here](https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L21)
56+
* commenting out the mashlib.js usage. Example [here](https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L15)
57+
58+
3. Use your own rad data and form
59+
Switch out the `input` and `target` (form and raw data) links. Example [here](https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L56)
60+
61+
4. Run a local server
62+
For example run `npx vite`in the `Documentation` folder and the navigate to something like: http://localhost:3000/form-examples/profile-demo.html
4963

50-
And then you just need to switch out the input nad target (form adn raw data) links on line https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L56
5164
## Spin-offs & further examples
5265

5366
- [Jeff's solid-ui-components](https://github.com/jeff-zucker/solid-ui-components) is a different take on the UI vocabulary

0 commit comments

Comments
 (0)