1.0.4 • Published 4 years ago

@ando105/ast-css-iter v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

:vietnam: Abstract Syntax Tree extractor

Build status

Methods

Stylesheet level

- getAllRules
- backwardRulesTracer
- addRule
- addDeclaration
- removeRule
- getImports
- getAllDeclarations
- getAllDeclarationsBySelector
- getAllDeclarationsByProperty
- getAllDeclarationsByValue

Rule level

- findDeclarations
- findDeclarationsBySelector
- findDeclarationsByProperty
- findDeclarationsByValue
- getAllRulesBySelector
- getAllRulesByType

Declaration level

- addDeclaration
- removeDeclaration
- getParam
- getAllParams

How to install

$ npm i @ando105/ast-css-iter --save-dev

Example :cherry_blossom: :fire:

const css = require('css')
const astIter = require('@ando105/ast-css-iter')

Development

Code Style

To be updated

Validate the code style with ESLint:

$ npm i eslint --save-dev
$ npm run eslint

Tests

Run the unit tests with mocha:

$ npm run test

Release

See Releases to see my detailed changelog.

License

License: MIT