Wax
HTML with Components


## Install Install the Wax cli using cargo : ``` $ cargo install wax-cli ``` ## Useage
Create new project
```md $ wax create ```
Build your project
```md $ wax build ```
## Project Structure ```graphql .//* │ ├─ .wax - # Wax file cache ├─ dist - # Wax build output │ ├─ src/* - # Your codebase (html, css, and js) │ ├─ lib/ - # Html wax components │ ├─ pages/ - # Your html pages │ └─ ... │ └─ wax.toml - # Wax config file ```
### Static Components Wax components are an extension of html.
Example : Component File
```html ~ src/lib/my-component.html

Hello from my component ! :D

```
Importing / including wax components is done using the tag.
e.g.
Example : Importing
```html ~ src/routes/index.html … … ```
### Dynamic Components * Passing parameters to a component is done using html attributes.
e.g.
Example : Importing
```html ~ src/routes/index.html … … ```
Each component has to declare its parameters using
Parameters can be inserted into the html using { [key] }
Example : Component File
```html ~ src/lib/my-component.html

{ title }

```
## Config
* ? : means it is optional
```toml # wax.toml [website] pages = "RelativePath" # Path to the directory containing your index.html. [build] minify = "Boolean?" # If enabled, will minify the collapsed HTML files. ```
## Testing
* Using the testing project in ./assets
``` $ cargo run build ./assets ```