File tree Expand file tree Collapse file tree 4 files changed +33
-2
lines changed Expand file tree Collapse file tree 4 files changed +33
-2
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1
1
<div align =" center " >
2
2
<img width =" 150 " height =" 150 " title =" PostHTML " src =" https://posthtml.github.io/posthtml/logo.svg " >
3
- <h1 >Merge inline longhand </h1 >
3
+ <h1 >Merge Longhand </h1 >
4
4
<p >Merge longhand inline CSS into shorthand</p >
5
5
6
6
[ ![ Version] [ npm-version-shield ]] [ npm ]
Original file line number Diff line number Diff line change
1
+ export type PluginOptions = {
2
+ /**
3
+ Array of tag names to process. All other tags will be skipped.
4
+
5
+ @default []
6
+
7
+ @example
8
+ ```js
9
+ const posthtml = require('posthtml')
10
+ const mergeInlineLonghand = require('posthtml-postcss-merge-longhand')
11
+
12
+ const html = `
13
+ <div style="margin: 0; margin-top: 20px;"></div>
14
+ <p style="margin: 0; margin-top: 10px;"></p>
15
+ `
16
+
17
+ posthtml([
18
+ mergeInlineLonghand({tags: ['div']})
19
+ ])
20
+ .process(html)
21
+ .then(result => console.log(result.html))
22
+
23
+ // Result:
24
+ // <div style="margin: 0; margin-top: 20px;"></div>
25
+ // <p style="margin: 0; margin-top: 10px;"></p>
26
+ ```
27
+ */
28
+ tags ?: string [ ] ;
29
+ } ;
Original file line number Diff line number Diff line change 8
8
"homepage" : " https://github.com/posthtml/posthtml-postcss-merge-longhand" ,
9
9
"repository" : " posthtml/posthtml-postcss-merge-longhand" ,
10
10
"main" : " lib" ,
11
+ "types" : " index.d.ts" ,
11
12
"engines" : {
12
13
"node" : " >=14.0.0"
13
14
},
41
42
"xo" : " ^0.54.2"
42
43
},
43
44
"files" : [
44
- " lib/*"
45
+ " lib/*" ,
46
+ " index.d.ts"
45
47
]
46
48
}
You can’t perform that action at this time.
0 commit comments