Created
February 11, 2016 15:38
-
-
Save tbremer/a3fd2241206dae24d67d to your computer and use it in GitHub Desktop.
postcss-css-variables no warnings or messages.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--font-family: 'Wingdings', 'Comic Sans', 'Papyrus', sans-serif; | |
} | |
body { | |
font-family: var(--font-family); | |
color: var(--black); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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