Skip to content

Commit 9693b62

Browse files
committed
update docs 📚
1 parent 5e3e0e9 commit 9693b62

63 files changed

Lines changed: 264 additions & 603 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Feliz [![Nuget](https://img.shields.io/nuget/v/Feliz.svg?maxAge=0&colorB=brightgreen)](https://www.nuget.org/packages/Feliz) [![Build status](https://ci.appveyor.com/api/projects/status/yqinhayy1pgfcubp/branch/master?svg=true)](https://ci.appveyor.com/project/Zaid-Ajaj/feliz/branch/master)
1+
# Feliz [![Nuget](https://img.shields.io/nuget/v/Feliz.svg?maxAge=0&colorB=brightgreen)](https://www.nuget.org/packages/Feliz)
22

33
A fresh retake of the React API in Fable, optimized for happiness.
44

55
Here is how it looks like:
66

7-
```fs
7+
```fsharp
88
module App
99
1010
open Feliz
@@ -30,32 +30,37 @@ let Counter() =
3030
3131
open Browser.Dom
3232
33-
let root = ReactDOM.createRoot(document.getElementById "root")
34-
root.render(Counter())
33+
let root = ReactDOM.createRoot (document.getElementById "root")
34+
root.render (Counter())
3535
```
3636

37-
### Features
37+
### Features
3838

39-
- Consistent, lightweight **formatting**: no more awkward indentation using two lists for every element.
39+
- Flexible **API design**: Combine the reliability of F# type safety with the flexibility to interop easily with native JavaScript.
4040
- Discoverable **attributes** with no more functions, `Html` attributes or css properties globally available so they are easy to find.
4141
- Proper **documentation**: each attribute and CSS property
4242
- Full **React API** support: Feliz aims to support the React API for building components using hooks, context and more.
4343
- Fully **Type-safe**: no more `Margin of obj` but instead utilizing a plethora of overloaded functions to account for the overloaded nature of `CSS` attributes, covering 90%+ of the CSS styles, values and properties.
44-
- Included **color list** of most commonly used `Html` colors in the `colors` module.
45-
- **Compatible** with the current React DSL used in applications.
4644
- **Compatible** with [Femto](https://github.com/Zaid-Ajaj/Femto).
4745
- Approximately **Zero** bundle size increase where everything function body is erased from the generated javascript unless you actually use said function.
4846

49-
### Quick Start
47+
### 🚀 Quick Start
5048

51-
```
49+
```bash
50+
# install the template (if you haven't already)
5251
dotnet new -i Feliz.Template
52+
# create a new Feliz project from the installed template
5353
dotnet new feliz -n MyProject
54+
# navigate to the created project folder
5455
cd MyProject
56+
# install the npm dependencies
5557
npm install
58+
# install .NET tools
59+
dotnet tool restore
60+
# start the development server
5661
npm start
5762
```
5863

59-
### Documentation
64+
### 📚 Documentation
6065

61-
Feliz has extensive documentation at [https://zaid-ajaj.github.io/Feliz](https://zaid-ajaj.github.io/Feliz) with live examples along side code samples, check them out and if you have any question, let us know!
66+
Feliz has extensive documentation at [https://zaid-ajaj.github.io/Feliz](https://zaid-ajaj.github.io/Feliz) with live examples along side code samples, check them out and if you have any question, let us know!

docs/docs/README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ displayed_sidebar: docsSidebar
44
sidebar_position: 0
55
---
66

7-
:::info
8-
This site is still WIP for this release!
9-
:::
10-
117
# Feliz [![Nuget](https://img.shields.io/nuget/v/Feliz.svg?maxAge=0&colorB=brightgreen)](https://www.nuget.org/packages/Feliz)
128

139
A fresh retake of the base React DSL to build React applications, optimized for happiness.
@@ -46,12 +42,10 @@ root.render (Counter())
4642

4743
### Features
4844

49-
- Consistent, lightweight **formatting**: no more awkward indentation using two lists for every element.
45+
- Flexible **API design**: Combine the reliability of F# type safety with the flexibility to interop easily with native JavaScript.
5046
- Discoverable **attributes** with no more functions, `Html` attributes or css properties globally available so they are easy to find.
5147
- Proper **documentation**: each attribute and CSS property
5248
- Full **React API** support: Feliz aims to support the React API for building components using hooks, context and more.
5349
- Fully **Type-safe**: no more `Margin of obj` but instead utilizing a plethora of overloaded functions to account for the overloaded nature of `CSS` attributes, covering 90%+ of the CSS styles, values and properties.
54-
- Included **color list** of most commonly used `Html` colors in the `colors` module.
55-
- **Compatible** with the current DSL used in applications.
5650
- **Compatible** with [Femto](https://github.com/Zaid-Ajaj/Femto).
5751
- Approximately **Zero** bundle size increase where everything function body is erased from the generated javascript unless you actually use said function.

docs/docs/api-docs/Contributing.md

Lines changed: 83 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,91 @@ title: Contributing
33
sidebar_position: 10
44
---
55

6+
# Contributing
7+
8+
If you are enjoying the Feliz project, consider contributing back and helping out with the community. There are many ways you can contribute, the first of which is to simply use Feliz in your project and report issues you come across whether there are missing style properties or properties that were incorrectly implemeneted.
9+
10+
# I want to contribute! What should i do?
11+
12+
Thats awesome! There are many ways you can contribute to the Feliz project:
13+
14+
1. 🏷️ Start by creating an issue of your planned changes. This allows us to discuss the changes before you start working on them and ensure that they are aligned with the project goals.
15+
2. 🛠️ Fork the repository and create a new branch for your changes.
16+
- Check out the section below to find the most important instructions for setting up your development environment.
17+
3. ✨ Make your changes and ensure that you follow the coding style and conventions used in the project. (Styling should be automatically applied by Fantomas if you use VS Code with Ionide)
18+
4. ✅ Write tests for your changes to ensure that they work as expected and do not introduce any regressions.
19+
5. 📚 Document your changes!
20+
- Every Feliz-.fsproj has a related "CHANGELOG" file. Add your changes following the instructions inside the file!
21+
- Write/Update documentation under `./docs`!
22+
6. 📄 Create a pull request with a clear description of your changes and the issue it addresses.
23+
24+
---
25+
26+
# Setting up your development environment
27+
28+
## Requirements
29+
30+
1. [.NET SDK 8.0 or later](https://dotnet.microsoft.com/en-us/download)
31+
2. [Node.js 20 or later](https://nodejs.org/)
32+
33+
## Setup
34+
35+
1. Clone the repository
36+
2. Install dependencies: `dotnet run --project ./build/Build.fsproj setup`.
37+
38+
<details>
39+
40+
<summary>Alternatively, you can manually install the dependencies:</summary>
41+
42+
- NPM dependencies:
43+
44+
```bash
45+
npm install
46+
```
47+
48+
- .NET dependencies:
49+
50+
```bash
51+
dotnet restore
52+
```
53+
54+
- .NET tools:
55+
56+
```bash
57+
dotnet tool restore
58+
```
59+
60+
</details>
61+
62+
3. Verify correct setup by running the tests `dotnet run --project ./build/Build.fsproj test`
63+
4. Ready! 🎉
64+
65+
66+
# Workflows
67+
68+
Feliz uses a f# build project to run common tasks such as testing. You can find the entrypoint for the build project under `./build/Build.fsproj`.
69+
670
:::info
7-
This site is still WIP for this release!
71+
- **On Windows** you can also use `.\build.cmd` to run the build tasks instead of `dotnet run --project ./build/Build.fsproj`.
72+
- **On MacOS/Linux** you can also use `./build.sh` to run the build tasks instead of `dotnet run --project ./build/Build.fsproj`.
873
:::
974

10-
# Contributing
75+
## Testing
1176

12-
If you are enjoying the Feliz project, consider contributing back and helping out with the community. There are many ways you can contribute, the first of which is to simply use Feliz in your project and report issues you come across whether there are missing style properties or properties that were incorrectly implemeneted.
77+
```bash
78+
dotnet run --project ./build/Build.fsproj test
79+
```
80+
81+
## Run docs
82+
83+
1. Go into docs folder:
84+
85+
```bash
86+
cd docs
87+
```
88+
89+
2. Start docs server:
1390

14-
### More documentation and samples
15-
You can also contribute to the documentation of the Feliz and it's ecosystem: creating sample code with live examples is really appreciated as it helps test out the library and creates a greate reference for using it.
91+
```bash
92+
npm run start
93+
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
hide_title: true
3+
---
4+
5+
import MarkdownFetcher from '@site/src/components/MarkdownFetcher';
6+
7+
<MarkdownFetcher
8+
mdSource='https://raw.githubusercontent.com/fable-compiler/Fable/refs/heads/main/README.md'
9+
name='Fable'
10+
github='https://github.com/fable-compiler/Fable'
11+
docs='https://fable.io/'
12+
nuget='https://www.nuget.org/packages/Fable/'
13+
children={<>
14+
The driving force behind F# web development. Fable is an F# to JavaScript/TypeScript compiler that allows you to write client-side code in F#. While beeing able to interoperate with the vast JavaScript ecosystem, you also get to leverage F#'s powerful type system and functional programming features to build robust and maintainable web applications.
15+
</>}
16+
/>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
hide_title: true
3+
---
4+
5+
import MarkdownFetcher from '@site/src/components/MarkdownFetcher';
6+
7+
<MarkdownFetcher
8+
mdSource='https://raw.githubusercontent.com/fsprojects/fantomas/refs/heads/main/README.md'
9+
name='Fantomas'
10+
github='https://github.com/fsprojects/fantomas'
11+
docs='https://fsprojects.github.io/fantomas/'
12+
nuget='https://www.nuget.org/packages/fantomas/'
13+
children={<>
14+
Fantomas is a popular and customizable code formatter for F#. If you use VS Code, you can make it format your file on save with the Ionide extension. Make sure all files automatically conform to a consistent style.
15+
</>}
16+
/>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ import MarkdownFetcher from '@site/src/components/MarkdownFetcher';
1010
github='https://github.com/Zaid-Ajaj/Femto'
1111
docs='https://github.com/Zaid-Ajaj/Femto?tab=readme-ov-file#femto--'
1212
nuget='https://www.nuget.org/packages/Femto'
13+
children={<>
14+
Femto is a command-line tool for synchronizing F# and JavaScript dependencies.
15+
It scans a Fable project, detects which npm packages are required, and installs or updates them automatically.
16+
It supports multiple package managers, including npm, yarn, pnpm, and poetry, and helps keep F#/.NET and JavaScript dependencies consistent.
17+
</>}
1318
/>

docs/docs/ecosystem/01_UI/Feliz.MaterialUI.mdx

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/docs/ecosystem/01_UI/_category_.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)