Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinmcfarland committed Aug 7, 2024
1 parent 48bdf7f commit 88bf7cd
Showing 1 changed file with 34 additions and 11 deletions.
45 changes: 34 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,29 +102,52 @@ mole.config('src/mole.config.js')

## API

- **`mole.config( string | object ): void`**
- ### Set configuration

Set the configuration.
`mole.config( config ): void`

- **`mole.theme( string | object ): void`**
#### Parameters

Set or update the theme data.
`config` { string | object } path to file, or object for config

- **`mole.register( model: string | template: string, name: string, callback?: function ): void`**
- ### Set or update theme data

`mole.theme( string | object ): void`

#### Arguments

`data` { string | object } path to file, or object for data

- ### Register a model or template

`mole.register( type, name, callback ): void`

#### Arguments

`type` { string } must be `'model'` or `'template'`
`name` { string } the name of the model or template
`callback` { function | string } the body of the model or template

Register a model or template for use.

- **`mole.use( model: string | template: string, name, callback? ): void`**
- ### Use a model or template

`mole.use( part ): void`

#### Arguments

Use a model or template directory, or use one that has been registered.
`part` { array } an array
`type` { string } must be `'template'` or `'model'`
`name` { string } name of the template or model
`callback` { function | string } the body of the model or template

- **`mole.render(): string[]`**
- ### Render an array of templates

Returns an array of rendered templates.
`mole.render(): string[]`

- **`mole.build()`**
- ### Build the output files

Builds the output files.
`mole.build()`

## Development

Expand Down

0 comments on commit 88bf7cd

Please sign in to comment.