Skip to content

Commit

Permalink
Merge pull request #2 from shauns/master
Browse files Browse the repository at this point in the history
Find normalize.css by resolving
  • Loading branch information
Sean King committed Sep 21, 2015
2 parents ee69670 + 1383634 commit a7bb547
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

var postcss = require('postcss'),
fs = require('fs'),
path = require('path'),
CleanCSS = require('clean-css');

module.exports = postcss.plugin('postcss-normalize', function () {
return function(css) {

var normalize = fs.readFileSync(path.join(__dirname, 'node_modules/normalize.css/normalize.css'), 'utf8');
var normalize = fs.readFileSync(require.resolve('normalize.css'), 'utf8');
normalize = new CleanCSS().minify(normalize).styles;

css.prepend(normalize);
Expand Down

0 comments on commit a7bb547

Please sign in to comment.