This repository was archived by the owner on Jun 6, 2022. It is now read-only.
File tree 4 files changed +32
-20
lines changed
4 files changed +32
-20
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- ecmaFeatures:
3
- modules: true
2
+ root: true
3
+ extends: eslint:recommended
4
+
5
+ #ecmaFeatures:
6
+ # modules: true
4
7
5
8
env:
6
- es6: true
9
+ # es6: true
7
10
browser: true
8
11
node: true
9
12
@@ -17,16 +20,20 @@ rules:
17
20
brace-style: [2, "stroustrup"]
18
21
comma-dangle: [2, "always-multiline"]
19
22
comma-style: [2, "last"]
20
- computed-property-spacing: [2, "never"]
21
23
dot-location: [2, "property"]
22
24
23
25
one-var: [2, "never"]
26
+ # no-var: [2]
27
+ # prefer-const: [2]
24
28
no-bitwise: [2]
25
29
26
- object-shorthand: [2, "methods"]
30
+ object-curly-spacing: [2, "never"]
31
+ array-bracket-spacing: [2, "never"]
32
+ computed-property-spacing: [2, "never"]
33
+
34
+ space-unary-ops: [2, {"words": true, "nonwords": false}]
27
35
space-after-keywords: [2, "always"]
28
36
space-before-blocks: [2, "always"]
29
37
space-before-function-paren: [2, "never"]
30
- space-in-brackets: [2, "never"]
31
38
space-in-parens: [2, "never"]
32
- spaced-line- comment: [2, "always"]
39
+ spaced-comment: [2, "always"]
Original file line number Diff line number Diff line change
1
+ # 5.0.0 - 2015-08-25
2
+
3
+ - Removed: compatibility with postcss v4.x
4
+ - Added: compatibility with postcss v5.x
5
+
1
6
# 4.1.0 - 2015-06-30
2
7
3
8
- Added: Allow custom media to reference each other
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ function customMedia(options) {
51
51
var toRemove = [ ]
52
52
53
53
// read custom media queries
54
- styles . eachAtRule ( function ( rule ) {
54
+ styles . walkAtRules ( function ( rule ) {
55
55
if ( rule . name !== "custom-media" ) {
56
56
return
57
57
}
@@ -87,7 +87,7 @@ function customMedia(options) {
87
87
} )
88
88
89
89
// transform custom media query aliases
90
- styles . eachAtRule ( function ( rule ) {
90
+ styles . walkAtRules ( function ( rule ) {
91
91
if ( rule . name !== "media" ) {
92
92
return
93
93
}
@@ -123,19 +123,21 @@ function customMedia(options) {
123
123
}
124
124
var atRule = postcss . atRule ( {
125
125
name : "custom-media" ,
126
- afterName : " " ,
127
126
params : name + " " + map [ name ] . value ,
127
+ raws : {
128
+ afterName : " " ,
129
+ } ,
128
130
} )
129
131
styles . append ( atRule )
130
132
} )
131
- styles . semicolon = true
132
- styles . after = "\n"
133
+ styles . raws . semicolon = true
134
+ styles . raws . after = "\n"
133
135
}
134
136
}
135
137
136
138
// remove @custom -media
137
139
toRemove . forEach ( function ( rule ) {
138
- rule . removeSelf ( )
140
+ rule . remove ( )
139
141
} )
140
142
}
141
143
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " postcss-custom-media" ,
3
- "version" : " 4.1 .0" ,
4
- "description" : " PostCSS plugin to transform W3C CSS Custom Media Queries to more compatible CSS" ,
3
+ "version" : " 5.0 .0" ,
4
+ "description" : " PostCSS plugin to transform W3C CSS Custom Media Queries to more compatible CSS" ,
5
5
"keywords" : [
6
6
" css" ,
7
7
" postcss" ,
8
- " postcss-plugins " ,
8
+ " postcss-plugin " ,
9
9
" media queries" ,
10
10
" custom-media"
11
11
],
16
16
"url" : " https://github.com/postcss/postcss-custom-media.git"
17
17
},
18
18
"files" : [
19
- " CHANGELOG.md" ,
20
- " LICENSE" ,
21
19
" index.js"
22
20
],
23
21
"dependencies" : {
24
- "postcss" : " ^4.1.4 "
22
+ "postcss" : " ^5.0.0 "
25
23
},
26
24
"devDependencies" : {
27
- "eslint" : " ^0.23 .0" ,
25
+ "eslint" : " ^1.0 .0" ,
28
26
"tape" : " ^4.0.0"
29
27
},
30
28
"scripts" : {
You can’t perform that action at this time.
0 commit comments