Skip to content

Commit fd32fee

Browse files
committed
Merge pull request #12 from ai/guidelines
Use PostCSS 4.1 API
2 parents 51ee3f8 + b454742 commit fd32fee

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
*/
44
var reduceCSSCalc = require("reduce-css-calc")
55
var helpers = require("postcss-message-helpers")
6+
var postcss = require("postcss");
67

78
/**
89
* PostCSS plugin to reduce calc() function calls.
910
*/
10-
module.exports = function plugin(options) {
11+
module.exports = postcss.plugin("postcss-calc", function(options) {
1112
options = options || {}
1213
var precision = options.precision
1314
var preserve = options.preserve
@@ -34,4 +35,4 @@ module.exports = function plugin(options) {
3435
}, decl.source)
3536
})
3637
}
37-
}
38+
});

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"keywords": [
66
"css",
77
"postcss",
8-
"postcss-plugins",
8+
"postcss-plugin",
99
"calculation",
1010
"calc"
1111
],
@@ -22,12 +22,12 @@
2222
],
2323
"dependencies": {
2424
"postcss-message-helpers": "^2.0.0",
25-
"reduce-css-calc": "^1.2.0"
25+
"reduce-css-calc": "^1.2.0",
26+
"postcss": "^4.1.11"
2627
},
2728
"devDependencies": {
2829
"jscs": "^1.6.2",
2930
"jshint": "^2.5.6",
30-
"postcss": "^4.0.2",
3131
"postcss-custom-properties": "^3.0.0",
3232
"tape": "^3.0.0"
3333
},

0 commit comments

Comments
 (0)