Skip to content

Commit 0a9a680

Browse files
committed
Refactor docs
1 parent 6a0049c commit 0a9a680

File tree

2 files changed

+20
-61
lines changed

2 files changed

+20
-61
lines changed

package.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,13 @@
3131
"browserify": "^13.0.0",
3232
"esmangle": "^1.0.1",
3333
"istanbul": "^0.4.0",
34-
"remark": "^4.0.0",
35-
"remark-comment-config": "^3.0.0",
36-
"remark-github": "^4.0.1",
37-
"remark-lint": "^3.0.0",
38-
"remark-usage": "^3.0.0",
39-
"remark-validate-links": "^3.0.0",
34+
"remark-cli": "^2.1.0",
35+
"remark-preset-wooorm": "^1.0.0",
4036
"tape": "^4.4.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 hastUtilScriptSupporting > hast-util-script-supporting.js",
4642
"build-mangle": "esmangle hast-util-script-supporting.js > hast-util-script-supporting.min.js",
4743
"build": "npm run build-md && npm run build-bundle && npm run build-mangle",
@@ -55,5 +51,8 @@
5551
"ignores": [
5652
"hast-util-is-element.js"
5753
]
54+
},
55+
"remarkConfig": {
56+
"presets": "wooorm"
5857
}
5958
}

readme.md

+14-54
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# hast-util-script-supporting [![Build Status][build-badge]][build-page] [![Coverage Status][coverage-badge]][coverage-page]
22

3-
Check if a [node][] is a [**script-supporting**][spec] [element][].
3+
Check if a [HAST node][hast] is a [**script-supporting**][spec] [element][].
44

55
## Installation
66

@@ -10,57 +10,23 @@ Check if a [node][] is a [**script-supporting**][spec] [element][].
1010
npm install hast-util-script-supporting
1111
```
1212

13-
**hast-util-script-supporting** is also available as an AMD, CommonJS, and
14-
globals module, [uncompressed and compressed][releases].
15-
1613
## Usage
1714

18-
Dependencies:
19-
2015
```javascript
2116
var scriptSupporting = require('hast-util-script-supporting');
22-
```
23-
24-
Given a non-script-supporting value:
25-
26-
```javascript
27-
var result = scriptSupporting({
28-
'type': 'element',
29-
'tagName': 'a',
30-
'properties': {
31-
'href': '#alpha',
32-
'title': 'Bravo'
33-
},
34-
'children': [{
35-
'type': 'text',
36-
'value': 'Charlie'
37-
}]
38-
});
39-
```
40-
41-
Yields:
42-
43-
```js
44-
false
45-
```
46-
47-
Given a script-supporting element:
4817

49-
```javascript
50-
result = scriptSupporting({
51-
'type': 'element',
52-
'tagName': 'template',
53-
'children': [{
54-
'type': 'text',
55-
'value': 'Delta'
56-
}]
57-
});
58-
```
59-
60-
Yields:
61-
62-
```js
63-
true
18+
scriptSupporting({
19+
type: 'element',
20+
tagName: 'a',
21+
properties: {href: '#alpha', title: 'Bravo'},
22+
children: [{type: 'text', value: 'Charlie'}]
23+
}); //=> false
24+
25+
scriptSupporting({
26+
type: 'element',
27+
tagName: 'template',
28+
children: [{type: 'text', value: 'Delta'}]
29+
}); //=> true
6430
```
6531

6632
## API
@@ -69,10 +35,6 @@ true
6935

7036
Check if the given value is a [**script-supporting**][spec] [element][].
7137

72-
**Parameters**: `node` (`*`) — Value to check.
73-
74-
**Returns**: `boolean`, whether `node` passes the test.
75-
7638
## License
7739

7840
[MIT][license] © [Titus Wormer][author]
@@ -89,13 +51,11 @@ Check if the given value is a [**script-supporting**][spec] [element][].
8951

9052
[npm]: https://docs.npmjs.com/cli/install
9153

92-
[releases]: https://github.com/wooorm/hast-util-script-supporting/releases
93-
9454
[license]: LICENSE
9555

9656
[author]: http://wooorm.com
9757

98-
[node]: https://github.com/wooorm/hast#node
58+
[hast]: https://github.com/wooorm/hast
9959

10060
[element]: https://github.com/wooorm/hast#element
10161

0 commit comments

Comments
 (0)