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 3131 "esmangle" : " ^1.0.1" ,
3232 "nyc" : " ^7.0.0" ,
3333 "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" ,
4036 "tape" : " ^4.0.0" ,
4137 "xo" : " ^0.17.0"
4238 },
4339 "scripts" : {
44- "build-md" : " remark . --quiet --frail" ,
40+ "build-md" : " remark . --quiet --frail --output " ,
4541 "build-bundle" : " browserify index.js --bare -s hastUtilToParse5 > hast-util-to-parse5.js" ,
4642 "build-mangle" : " esmangle hast-util-to-parse5.js > hast-util-to-parse5.min.js" ,
4743 "build" : " npm run build-md && npm run build-bundle && npm run build-mangle" ,
6763 "branches" : 100
6864 },
6965 "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"
8167 }
8268}
Original file line number Diff line number Diff line change 22
33Transform [ HAST] [ ] to [ Parse5’s AST] [ ast ] .
44
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,
66and much more fragile.
77
88## Installation
99
10- [ npm] [ npm-install ] :
10+ [ npm] [ ] :
1111
1212``` bash
1313npm install hast-util-to-parse5
1414```
1515
1616## Usage
1717
18- Dependencies:
19-
2018``` javascript
2119var toParse5 = require (' hast-util-to-parse5' );
22- ```
23-
24- Fixture:
2520
26- ``` javascript
2721var ast = toParse5 ({
2822 type: ' element' ,
2923 tagName: ' h1' ,
3024 properties: {},
3125 children: [{type: ' text' , value: ' World!' }]
3226});
27+
28+ console .log (ast);
3329```
3430
3531Yields:
@@ -63,7 +59,7 @@ Parse5 adapter.
6359
6460[ codecov ] : https://codecov.io/github/wooorm/hast-util-to-parse5
6561
66- [ npm-install ] : https://docs.npmjs.com/cli/install
62+ [ npm ] : https://docs.npmjs.com/cli/install
6763
6864[ license ] : LICENSE
6965
You can’t perform that action at this time.
0 commit comments