This package has been deprecated

Author message:

please use @postcss-plugins/console instead

postcss-console
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

postcss-console

Travis Codecov npm MIT License

A PostCSS plugin output messages to the terminal.

Installation

npm install postcss-console

What is this? For example, you have the following CSS file (I'm using postcss-each, postcss-text-transform and postcss-cssnext):

backgrounds.css

.u {
  @console.warn Here comes the postcss-console plugin;
  @each $color in greenyellowred {
    @console.assert '$color' == 'green';
    @text-transform $colorupperFirst, $colorTransformed {
      @console.log the text was transformed from $color to $colorTransformed;
      &-bg$(colorTransformed) {
        background-color: $color;
      }
    }
  }
  @console.error This is an error message;
}
 

And the plugin will give you:

console

Usage

JavaScript

Put this plugin after all plugins

postcss([
   require('other-plugin'),
   require('postcss-console')
]);

TypeScript

import * as postcssConsole from 'postcss-console';
 
postcss([ postcssConsole() ]);
@console.log This is an informative message
@console.warn This is a warn message
@console.error This is an error message
@console.assert Boolean expression

Testing

This will build scripts, run tests and generate a code coverage report. Anything less than 100% coverage will throw an error.

npm test

See PostCSS docs for examples for your environment.

Contributing

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests (npm test).

MIT License

Package Sidebar

Install

npm i postcss-console

Weekly Downloads

105

Version

0.1.0

License

MIT

Last publish

Collaborators

  • ezavile