Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/casesandberg/htmltoless
https://github.com/casesandberg/htmltoless
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/casesandberg/htmltoless
- Owner: casesandberg
- Created: 2014-10-19T21:19:46.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-26T21:15:28.000Z (about 10 years ago)
- Last Synced: 2024-10-06T00:09:35.721Z (about 1 month ago)
- Language: JavaScript
- Size: 92.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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' +
'
' +
'Richard Branson' +
'
'
var less = htmltoless.parse(html);
console.log(less);
```
###Output
```less
.person{
.person-avatar{
.avatar{
}
}
.person-name{
span{
}
}
}
```
###Run Tests
mocha