postcss-custom-selectors
Advanced tools
Comparing version 2.0.1 to 2.1.0
@@ -0,1 +1,5 @@ | ||
# 2.1.0 - 2015-06-04 | ||
* \- Fixed: Use PostCSS 4.1 plugin API. | ||
# 2.0.1 - 2015-06-03 | ||
@@ -2,0 +6,0 @@ |
28
index.js
@@ -0,1 +1,2 @@ | ||
var postcss = require("postcss") | ||
/** | ||
@@ -11,16 +12,17 @@ * 匹配自定义选择器 | ||
*/ | ||
module.exports = customSelector | ||
module.exports = postcss.plugin("postcss-custom-selectors", function(options) { | ||
/** | ||
* 插件配置 | ||
*/ | ||
options = options || {} | ||
var extensions = options.extensions || {} | ||
var line_break = '\n' | ||
var map = {} | ||
var toRemove = [] | ||
var customSelectors = {} | ||
/** | ||
* 读取和替换自定义选择器 | ||
*/ | ||
function customSelector(options) { | ||
/** | ||
* 读取和替换自定义选择器 | ||
*/ | ||
return function(styles) { | ||
options = options || {} | ||
var extensions = options.extensions || {} | ||
var line_break = '\n' | ||
var map = {} | ||
var toRemove = [] | ||
var customSelectors = {} | ||
// 读取自定义选择器 | ||
@@ -84,2 +86,2 @@ styles.eachAtRule(function(rule) { | ||
} | ||
} | ||
}) |
{ | ||
"name": "postcss-custom-selectors", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "PostCSS plugin to transform W3C CSS Extensions(Custom Selectors) to more compatible CSS", | ||
@@ -11,3 +11,4 @@ "keywords": [ | ||
"selector", | ||
"custom-selector" | ||
"custom-selector", | ||
"custom selector" | ||
], | ||
@@ -27,4 +28,4 @@ "author": "yisi", | ||
"devDependencies": { | ||
"postcss": "^3.0.0", | ||
"tape": "^3.0.0" | ||
"postcss": "^4.1.11", | ||
"tape": "^4.0.0" | ||
}, | ||
@@ -31,0 +32,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16005
73