css-doc-parse
v2.0.2
Published
This is an generator of docs for css in Polymer-Cells
Downloads
1
Maintainers
Readme
CSS-DOC-PARSE
This project allow generate MarkDown documentation for Polymer styles components
Getting Started
- Clone the repository
- Install NPM dependencies
npm test
for run unit testing (Using Jest)
How to use
- npm install --global css-doc-parse`
- Exec
css-doc-parse <filename> --type <type>
Types
- lite - Only variables and mixins
- full - All the styles founded [default]
Prerequisites
- Node and NPM
- Supports ES6 Lint
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Methods
buildMarkDownTable
Generate a markdown table from Polymer styles file
Parameters
getCSS
Get the styles from a file readed from command line
Parameters
Name
string of file to read
Returns Array<object> Array with all objects generates from the read file
formatCSSObject
Generates an array in an specific format
Parameters
objectCss
object? Getit from convertion of the html or css string.
Returns Array<object> An array with all objects from selector object,
getStylesFromStyleTag
Get the styles inside tag from a string with the basic structure of Polymer elements
Parameters
htmlString
string? Any string with css code inside of tag
Returns string The string returned have all css code
cssToObject
Get all rules of css in a string and make an object for each selector adding him properties like subproperties of each selector
Parameters
cssString
string? Any string with html code inside of the basic structure of Polymer components or css file
Returns object The object of css code
Acknowledgments
- The main idea of this project is based in M.O.S.T. a tool created by Kus Camara Repo and is created because resolve the pain of style documentation.