bem-contrib / html2bemjson

html to bemjson converter
30 stars 2 forks source link

Docs: public API info #7

Open qfox opened 9 years ago

qfox commented 9 years ago

Something like

## How to use

### API

#### convert(html: string, opts: Object): BEMJSON

Options:
- preserveComments: boolean - preserves comments as strings
- preserveWrongClasses: boolean - preserves non-standard classes
- naming: Object - `bem-naming` options used to parse classes

#### stringify(html: string, opts: Object): string

All `convert` options plus:
- indent: string - String used to indent nested objects (4 spaces by default: `'    '`)

Atm there are just examples without any interfaces.