Wax Project Structure

graphql ./<my-wax-site>/* ├─ src/* - # Your codebase (html, css, and js) │ ├─ .wax - # Wax file cache │ ├─ lib/ - # Html components │ ├─ routes/ - # Location of all your html pages │ ├─ wax.toml - # Wax config file │ └─ ... │ └─ build/ - # Wax build output


Install

Install the Wax cli using cargo : $ cargo install wax-cli

Useage

Create new project

md $ wax create <NAME>

Build your project

md $ wax build <PATH>


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 }

```


Testing

* Using the testing project in ./assets

$ cargo run build ./assets