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 11language : node_js
22node_js :
3- - " 4"
4- - " 6"
53- " 8"
64- " 10"
5+ - " 12"
76- " node"
Original file line number Diff line number Diff line change 33const postcss = require ( 'postcss' )
44const Selector = require ( 'postcss-selector-parser' )
55
6- module . exports = postcss . plugin ( 'postcss-prefix' , postcssPrefix )
6+ module . exports = postcssPrefix
7+ postcssPrefix . postcss = true
78
89function postcssPrefix ( prefix , options ) {
910 options = options || { }
1011
11- return function walk ( root ) {
12- root . walkRules ( function ( rule ) {
12+ return {
13+ postcssPlugin : 'postcss-prefix' ,
14+ Rule : function ( rule ) {
1315 const selector = Selector ( transformSelectors )
1416 . processSync ( rule . selector )
1517 rule . selector = selector
16- } )
18+ }
1719 }
1820
1921 function transformSelectors ( selectors ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " postcss-prefix" ,
3+ "description" : " Replace `:host` elements with a prefix of your choosing" ,
34 "version" : " 2.2.0" ,
4- "license " : " MIT " ,
5- "repository " : " stackcss/postcss-prefix" ,
5+ "author " : " Hugh Kennedy <hughskennedy@gmail.com> " ,
6+ "bugs " : " https://github.com/ stackcss/postcss-prefix/issues " ,
67 "dependencies" : {
7- "postcss" : " ^5.0.8" ,
8- "postcss-selector-parser" : " ^4.0.0"
8+ "postcss-selector-parser" : " ^6.0.2"
99 },
1010 "devDependencies" : {
11- "tape" : " ^4.2.1"
11+ "postcss" : " ^8.0.5" ,
12+ "tape" : " ^5.0.1"
1213 },
14+ "homepage" : " https://github.com/stackcss/postcss-prefix" ,
15+ "license" : " MIT" ,
16+ "main" : " index.js" ,
17+ "repository" : " stackcss/postcss-prefix" ,
1318 "scripts" : {
1419 "test" : " tape test/index.js"
1520 }
You can’t perform that action at this time.
0 commit comments