File tree Expand file tree Collapse file tree 2 files changed +9
-27
lines changed Expand file tree Collapse file tree 2 files changed +9
-27
lines changed Original file line number Diff line number Diff line change 31
31
"esmangle" : " ^1.0.1" ,
32
32
"nyc" : " ^7.0.0" ,
33
33
"parse5" : " ^2.1.5" ,
34
- "remark-cli" : " ^1.0.0" ,
35
- "remark-comment-config" : " ^4.0.0" ,
36
- "remark-github" : " ^5.0.0" ,
37
- "remark-lint" : " ^4.0.0" ,
38
- "remark-usage" : " ^4.0.0" ,
39
- "remark-validate-links" : " ^4.0.0" ,
34
+ "remark-cli" : " ^2.1.0" ,
35
+ "remark-preset-wooorm" : " ^1.0.0" ,
40
36
"tape" : " ^4.0.0" ,
41
37
"xo" : " ^0.17.0"
42
38
},
43
39
"scripts" : {
44
- "build-md" : " remark . --quiet --frail" ,
40
+ "build-md" : " remark . --quiet --frail --output " ,
45
41
"build-bundle" : " browserify index.js --bare -s hastUtilToParse5 > hast-util-to-parse5.js" ,
46
42
"build-mangle" : " esmangle hast-util-to-parse5.js > hast-util-to-parse5.min.js" ,
47
43
"build" : " npm run build-md && npm run build-bundle && npm run build-mangle" ,
67
63
"branches" : 100
68
64
},
69
65
"remarkConfig" : {
70
- "output" : true ,
71
- "plugins" : {
72
- "comment-config" : null ,
73
- "github" : null ,
74
- "usage" : null ,
75
- "lint" : null ,
76
- "validate-links" : null
77
- },
78
- "settings" : {
79
- "bullet" : " *"
80
- }
66
+ "presets" : " wooorm"
81
67
}
82
68
}
Original file line number Diff line number Diff line change 2
2
3
3
Transform [ HAST] [ ] to [ Parse5’s AST] [ ast ] .
4
4
5
- Why not use an adapter? Because it’s more code weight to use adapters,
5
+ Why not use an adapter? Because it’s more code weight to use adapters,
6
6
and much more fragile.
7
7
8
8
## Installation
9
9
10
- [ npm] [ npm-install ] :
10
+ [ npm] [ ] :
11
11
12
12
``` bash
13
13
npm install hast-util-to-parse5
14
14
```
15
15
16
16
## Usage
17
17
18
- Dependencies:
19
-
20
18
``` javascript
21
19
var toParse5 = require (' hast-util-to-parse5' );
22
- ```
23
-
24
- Fixture:
25
20
26
- ``` javascript
27
21
var ast = toParse5 ({
28
22
type: ' element' ,
29
23
tagName: ' h1' ,
30
24
properties: {},
31
25
children: [{type: ' text' , value: ' World!' }]
32
26
});
27
+
28
+ console .log (ast);
33
29
```
34
30
35
31
Yields:
@@ -63,7 +59,7 @@ Parse5 adapter.
63
59
64
60
[ codecov ] : https://codecov.io/github/wooorm/hast-util-to-parse5
65
61
66
- [ npm-install ] : https://docs.npmjs.com/cli/install
62
+ [ npm ] : https://docs.npmjs.com/cli/install
67
63
68
64
[ license ] : LICENSE
69
65
You can’t perform that action at this time.
0 commit comments