File tree 2 files changed +22
-11
lines changed
2 files changed +22
-11
lines changed Original file line number Diff line number Diff line change 25
25
"node" : " >=10.0.0"
26
26
},
27
27
"dependencies" : {
28
- "@csstools/normalize.css" : " *" ,
29
- "postcss" : " ^7.0.27" ,
28
+ "@csstools/normalize.css" : " 10.1.0" ,
30
29
"postcss-browser-comments" : " ^3.0.0" ,
31
- "sanitize.css" : " * "
30
+ "sanitize.css" : " 11.0.0 "
32
31
},
33
32
"devDependencies" : {
34
33
"@babel/core" : " ^7.9.0" ,
35
34
"@babel/plugin-syntax-import-meta" : " ^7.8.3" ,
36
35
"@babel/preset-env" : " ^7.9.5" ,
37
36
"babel-eslint" : " ^10.1.0" ,
37
+ "browserslist" : " ^4.16.3" ,
38
38
"eslint" : " ^6.8.0" ,
39
+ "postcss" : " ^8.2.8" ,
39
40
"postcss-import" : " ^12.0.1" ,
40
- "postcss-tape" : " ^5 .0.2 " ,
41
+ "postcss-tape" : " ^6 .0.1 " ,
41
42
"pre-commit" : " ^1.2.2" ,
42
43
"rollup" : " ^2.6.0" ,
43
44
"rollup-plugin-babel" : " ^4.4.0"
44
45
},
45
46
"peerDependencies" : {
46
- "browserslist" : " ^4"
47
+ "browserslist" : " ^4.16.3" ,
48
+ "postcss" : " ^8.2.8"
47
49
},
48
50
"babel" : {
49
51
"plugins" : [
Original file line number Diff line number Diff line change 1
- import { assign , create } from './lib/util' ;
2
- import postcss from 'postcss' ;
1
+ import { create } from './lib/util' ;
3
2
import postcssBrowserComments from 'postcss-browser-comments' ;
4
3
import postcssImportNormalize from './lib/postcssImportNormalize' ;
5
4
import postcssNormalize from './lib/postcssNormalize' ;
6
5
7
- export default postcss . plugin ( 'postcss-normalize' , opts => {
6
+ const plugin = opts => {
8
7
opts = create ( opts ) ;
9
8
10
- const commentsTransformer = postcssBrowserComments ( opts ) ;
9
+ const commentsTransformer = postcssBrowserComments ( opts ) . Once ;
11
10
const normalizeTransformer = postcssNormalize ( commentsTransformer , opts ) ;
12
11
const postcssImportConfig = postcssImportNormalize ( commentsTransformer , opts ) ;
13
12
14
- return assign ( normalizeTransformer , { postcssImport : postcssImportConfig } ) ;
15
- } ) ;
13
+ return {
14
+ postcssPlugin : 'postcss-normalize' ,
15
+ Once ( root ) {
16
+ return normalizeTransformer ( root )
17
+ } ,
18
+ postcssImport : postcssImportConfig
19
+ }
20
+ }
21
+
22
+ plugin . postcss = true ;
23
+
24
+ export default plugin ;
You can’t perform that action at this time.
0 commit comments