File tree Expand file tree Collapse file tree 4 files changed +18
-11
lines changed Expand file tree Collapse file tree 4 files changed +18
-11
lines changed Original file line number Diff line number Diff line change
1
+ package-lock = false
Original file line number Diff line number Diff line change 1
1
language : node_js
2
2
node_js :
3
- - " 4"
4
- - " 6"
5
3
- " 8"
6
4
- " 10"
5
+ - " 12"
7
6
- " node"
Original file line number Diff line number Diff line change 3
3
const postcss = require ( 'postcss' )
4
4
const Selector = require ( 'postcss-selector-parser' )
5
5
6
- module . exports = postcss . plugin ( 'postcss-prefix' , postcssPrefix )
6
+ module . exports = postcssPrefix
7
+ postcssPrefix . postcss = true
7
8
8
9
function postcssPrefix ( prefix , options ) {
9
10
options = options || { }
10
11
11
- return function walk ( root ) {
12
- root . walkRules ( function ( rule ) {
12
+ return {
13
+ postcssPlugin : 'postcss-prefix' ,
14
+ Rule : function ( rule ) {
13
15
const selector = Selector ( transformSelectors )
14
16
. processSync ( rule . selector )
15
17
rule . selector = selector
16
- } )
18
+ }
17
19
}
18
20
19
21
function transformSelectors ( selectors ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " postcss-prefix" ,
3
+ "description" : " Replace `:host` elements with a prefix of your choosing" ,
3
4
"version" : " 2.2.0" ,
4
- "license " : " MIT " ,
5
- "repository " : " stackcss/postcss-prefix" ,
5
+ "author " :
" Hugh Kennedy <[email protected] > " ,
6
+ "bugs " : " https://github.com/ stackcss/postcss-prefix/issues " ,
6
7
"dependencies" : {
7
- "postcss" : " ^5.0.8" ,
8
- "postcss-selector-parser" : " ^4.0.0"
8
+ "postcss-selector-parser" : " ^6.0.2"
9
9
},
10
10
"devDependencies" : {
11
- "tape" : " ^4.2.1"
11
+ "postcss" : " ^8.0.5" ,
12
+ "tape" : " ^5.0.1"
12
13
},
14
+ "homepage" : " https://github.com/stackcss/postcss-prefix" ,
15
+ "license" : " MIT" ,
16
+ "main" : " index.js" ,
17
+ "repository" : " stackcss/postcss-prefix" ,
13
18
"scripts" : {
14
19
"test" : " tape test/index.js"
15
20
}
You can’t perform that action at this time.
0 commit comments