File tree Expand file tree Collapse file tree 2 files changed +8
-28
lines changed Expand file tree Collapse file tree 2 files changed +8
-28
lines changed Original file line number Diff line number Diff line change 38
38
"esmangle" : " ^1.0.1" ,
39
39
"hastscript" : " ^3.0.0" ,
40
40
"nyc" : " ^7.1.0" ,
41
- "remark-cli" : " ^1.0.0" ,
42
- "remark-comment-config" : " ^4.0.0" ,
43
- "remark-github" : " ^5.0.0" ,
44
- "remark-lint" : " ^4.0.0" ,
45
- "remark-usage" : " ^4.0.0" ,
46
- "remark-validate-links" : " ^4.0.0" ,
41
+ "remark-cli" : " ^2.1.0" ,
42
+ "remark-preset-wooorm" : " ^1.0.0" ,
47
43
"tape" : " ^4.0.0" ,
48
44
"unist-builder" : " ^1.0.1" ,
49
45
"xo" : " ^0.17.0"
50
46
},
51
47
"scripts" : {
52
- "build-md" : " remark . --quiet --frail" ,
48
+ "build-md" : " remark . --quiet --frail --output " ,
53
49
"build-bundle" : " browserify index.js --bare -s hastUtilToHTML > hast-util-to-html.js" ,
54
50
"build-mangle" : " bundle-collapser hast-util-to-html.js | esmangle > hast-util-to-html.min.js" ,
55
51
"build" : " npm run build-md && npm run build-bundle && npm run build-mangle" ,
76
72
"branches" : 100
77
73
},
78
74
"remarkConfig" : {
79
- "output" : true ,
80
- "plugins" : [
81
- " comment-config" ,
82
- " github" ,
83
- " lint" ,
84
- " usage" ,
85
- " validate-links"
86
- ],
87
- "settings" : {
88
- "bullet" : " *"
89
- }
75
+ "presets" : " wooorm"
90
76
}
91
77
}
Original file line number Diff line number Diff line change 1
1
# hast-util-to-html [ ![ Build Status] [ travis-badge ]] [ travis ] [ ![ Coverage Status] [ codecov-badge ]] [ codecov ]
2
2
3
- <!-- lint disable heading-increment list-item-spacing-->
4
-
5
3
Transform [ HAST] [ ] to HTML.
6
4
7
5
## Installation
8
6
9
- [ npm] [ npm-install ] :
7
+ [ npm] [ ] :
10
8
11
9
``` bash
12
10
npm install hast-util-to-html
13
11
```
14
12
15
13
## Usage
16
14
17
- Dependencies:
18
-
19
15
``` javascript
20
16
var h = require (' hastscript' );
21
17
var toHTML = require (' hast-util-to-html' );
22
- ```
23
18
24
- Transform:
25
-
26
- ``` javascript
27
19
var tree = h (' .alpha' , [
28
20
' bravo ' ,
29
21
h (' b' , ' charlie' ),
@@ -32,6 +24,8 @@ var tree = h('.alpha', [
32
24
download: true
33
25
}, ' foxtrot' )
34
26
]);
27
+
28
+ console .log (toHTML (tree));
35
29
```
36
30
37
31
Yields:
@@ -145,7 +139,7 @@ you completely trust the content.
145
139
146
140
[ codecov ] : https://codecov.io/github/wooorm/hast-util-to-html
147
141
148
- [ npm-install ] : https://docs.npmjs.com/cli/install
142
+ [ npm ] : https://docs.npmjs.com/cli/install
149
143
150
144
[ license ] : LICENSE
151
145
You can’t perform that action at this time.
0 commit comments