Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

Conversation

@vweevers
Copy link

PR #5 was meant to fix options being mutated between files, but only works when no options are passed. This PR creates a copy of the options for every entry.

Additionally, I did a small cleanup of the tests for readability. For example, in this

new Buffer(fs.readFileSync(
    path.resolve(__dirname, "fixtures/index.css"),
    {encoding: "utf8"}
))

you can:

  • Shorten {encoding: "utf8"} to "utf8"
  • Or even leave it out, you want a buffer anyway
  • And because this snippet is used multiple times, I made a helper function:
function read(file, encoding) {
  return fs.readFileSync(path.resolve(__dirname, file), encoding)
}

@MoOx
Copy link
Owner

MoOx commented Nov 10, 2015

can you use "object-assign" ponyfill instead of xtend?
Anyway, you should read this lionelB/cssnext-brunch#10 (comment)

@vweevers
Copy link
Author

OK, replaced xtend.

Thanks for the link, though I'm just trying out postcss, so I wanted to start with a nice "preset" of plugins (and not spend too much time).

@vweevers vweevers closed this Mar 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants