Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/casesandberg/htmltoless


https://github.com/casesandberg/htmltoless

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

#HTML to LESS
Converts html into structured less.

###Installing

npm install htmltoless

###Useage

```javascript
var htmltoless = require("htmltoless");

var html =
'

  • ' +
    '
    ' +
    '
    ' +
    '
    ' +
    '
    ' +
    'Richard Branson' +
    '
    ' +
    '
  • ';

    var less = htmltoless.parse(html);

    console.log(less);
    ```

    ###Output

    ```less
    .person{

    .person-avatar{

    .avatar{

    }
    }
    .person-name{

    span{

    }
    }
    }
    ```

    ###Run Tests
    mocha