Skip to content

Use PostCSS 4.1 API #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
*/
var reduceCSSCalc = require("reduce-css-calc")
var helpers = require("postcss-message-helpers")
var postcss = require("postcss");

/**
* PostCSS plugin to reduce calc() function calls.
*/
module.exports = function plugin(options) {
module.exports = postcss.plugin("postcss-calc", function(options) {
options = options || {}
var precision = options.precision
var preserve = options.preserve
Expand All @@ -34,4 +35,4 @@ module.exports = function plugin(options) {
}, decl.source)
})
}
}
});
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"keywords": [
"css",
"postcss",
"postcss-plugins",
"postcss-plugin",
"calculation",
"calc"
],
Expand All @@ -22,12 +22,12 @@
],
"dependencies": {
"postcss-message-helpers": "^2.0.0",
"reduce-css-calc": "^1.2.0"
"reduce-css-calc": "^1.2.0",
"postcss": "^4.1.11"
},
"devDependencies": {
"jscs": "^1.6.2",
"jshint": "^2.5.6",
"postcss": "^4.0.2",
"postcss-custom-properties": "^3.0.0",
"tape": "^3.0.0"
},
Expand Down