10.0.9 • Published 8 years ago

isv-rx-styler v10.0.9

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
8 years ago

API

  • validate

      /* check a JSON Object with one property ,validate support of css property ,try  fix color to Hex , log errors & warnings
      * @param {object} json  , a decl node by postcss
      * JSON Object example:
       json {
        'raws': {},
        'type': 'decl',
        'source': {
          'start': {
            line: 17,
            column: 5
          },
          'end': {
            line: 17,
            column: 17
          }
        },
        'prop': 'background-color',
        'value': 'red'
      }
      * return  {
        jsonStyle: json
        log: {
          line: 17
          column: 17,
          reason: 'INFO: `background-color` property value `red` is autofixed to `#FF0000`',
          level: info
        }
      }
      */
    
      var rxStyler = require('@ali/rx-styler');
      var code = {
        'raws': {},
        'type': 'decl',
        'source': {
          'start': {
            'line': '17',
            'column': '5'
          },
          'end': {
            'line': '17',
            'column': '17'
          }
        },
        'prop': 'color',
        'value': 'red'
      };
    
      data = rx.validate(code);
10.0.9

8 years ago

10.0.8

8 years ago

10.0.6

8 years ago

10.0.5

8 years ago

10.0.4

8 years ago

10.0.0

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.2

8 years ago