Skip to content

Instantly share code, notes, and snippets.

@tbremer
Created February 11, 2016 15:38
Show Gist options
  • Save tbremer/a3fd2241206dae24d67d to your computer and use it in GitHub Desktop.
Save tbremer/a3fd2241206dae24d67d to your computer and use it in GitHub Desktop.
postcss-css-variables no warnings or messages.
:root {
--font-family: 'Wingdings', 'Comic Sans', 'Papyrus', sans-serif;
}
body {
font-family: var(--font-family);
color: var(--black);
}
var postcss = require('postcss');
var readFile = require('fs').readFileSync;
var css = readFile('./app.css');
postcss([require('postcss-css-variables')])
.process(css).
then(function(results) {
console.log(results.messages);
console.log(results.warnings());
console.log(results.css);
});
{
"name": "postcss-variables-no-warnigns",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"postcss": "^5.0.15",
"postcss-css-variables": "^0.5.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment