0.2.0 • Published 4 years ago

css3-lint v0.2.0

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

css3-lint - CSS Validation using NU Checker instance

Usage - node.js

The css3-lint module can be installed via npm:

$ npm install css3-lint

Once installed, it can be used like so:

var fs = require( 'fs' ),
    html5Lint = require( 'css3-lint' );

fs.readFile( 'style.css', 'utf8', function( err, html ) {
  if ( err )
    throw err;

  css3Lint( html, function( err, results ) {
    results.messages.forEach( function( msg ) {
      var type = msg.type, // error or warning
          message = msg.message;

      console.log( "CSS3 Lint [%s]: %s", type, message );
    });
  });
});