css-doc-parse

2.0.2 • Public • Published

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

  • Name string of file to read
  • Type string of format to generate the table

getCSS

Get the styles from a file readed from command line

Parameters

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

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.

Authors

  • Alfonso Ríos - Initial work - malforime
  • Aldo Aldaco - Testing and docs - doco

Dependencies (3)

Dev Dependencies (1)

Package Sidebar

Install

npm i css-doc-parse

Weekly Downloads

14

Version

2.0.2

License

MIT

Unpacked Size

16.2 kB

Total Files

11

Last publish

Collaborators

  • malforime