Skip to content

Commit e7f509f

Browse files
committed
Improve npm search ranking of individual packages
* Quality: Add changelogs (increase score from 92% to 100%) * Tests: Add test script to individual packages (increase score from 70% to 100%) * Health: Update unified (see c77d24f, increase score from 75% to 100%) * Branding: Add another badge (increase score from 85% to 100%)
1 parent 4e24d52 commit e7f509f

19 files changed

Lines changed: 800 additions & 685 deletions

File tree

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
See [GitHub Releases][releases] for the changelog.
4+
5+
[releases]: https://github.com/remarkjs/remark/releases

package.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
"browserify": "^16.0.0",
1010
"bundle-collapser": "^1.3.0",
1111
"camelcase": "^5.0.0",
12-
"chalk": "^2.0.0",
1312
"clone": "^2.0.0",
14-
"execa": "^1.0.0",
15-
"extend": "^3.0.0",
1613
"lerna": "^3.0.0",
1714
"mdast-util-assert": "^1.0.0",
1815
"mdast-util-compact": "^1.0.0",
@@ -24,9 +21,6 @@
2421
"tinyify": "^2.4.3",
2522
"unist-builder": "^1.0.2",
2623
"unist-util-remove-position": "^1.1.0",
27-
"unist-util-visit": "^1.1.0",
28-
"vfile": "^3.0.0",
29-
"wcwidth": "^1.0.1",
3024
"xo": "^0.23.0"
3125
},
3226
"scripts": {
@@ -35,10 +29,9 @@
3529
"build-bundle": "browserify packages/remark -s remark > remark.js",
3630
"build-mangle": "browserify packages/remark -s remark -p tinyify > remark.min.js",
3731
"build": "npm run build-bundle && npm run build-mangle",
38-
"test-api": "node test/api",
39-
"test-api-extensive": "TEST_EXTENDED=true node test/api",
40-
"test-cli": "node test/cli.js",
41-
"test-coverage": "nyc --reporter lcov tape test",
32+
"test-api": "tape packages/*/test.js test/index.js",
33+
"test-api-extensive": "TEST_EXTENDED=true npm run test-api",
34+
"test-coverage": "nyc --reporter lcov tape \"test/index.js\" \"packages/*/test.js\"",
4235
"test": "npm run format && npm run build && npm run test-coverage"
4336
},
4437
"nyc": {

packages/remark-cli/package.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99
"cli",
1010
"bin"
1111
],
12-
"dependencies": {
13-
"markdown-extensions": "^1.1.0",
14-
"remark": "^9.0.0",
15-
"unified-args": "^6.0.0"
16-
},
1712
"homepage": "http://remark.js.org",
1813
"repository": "https://github.com/remarkjs/remark/tree/master/packages/remark-cli",
1914
"bugs": "https://github.com/remarkjs/remark/issues",
@@ -27,6 +22,17 @@
2722
"files": [
2823
"cli.js"
2924
],
30-
"scripts": {},
25+
"dependencies": {
26+
"markdown-extensions": "^1.1.0",
27+
"remark": "^9.0.0",
28+
"unified-args": "^6.0.0"
29+
},
30+
"devDependencies": {
31+
"execa": "^1.0.0",
32+
"tape": "^4.9.1"
33+
},
34+
"scripts": {
35+
"test": "tape test.js"
36+
},
3137
"xo": false
3238
}

packages/remark-cli/readme.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# remark-cli [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] [![Chat][chat-badge]][chat]
1+
# remark-cli [![Travis][build-badge]][build-status] [![Coverage][coverage-badge]][coverage-status] [![Downloads][dl-badge]][dl] [![Chat][chat-badge]][chat]
22

33
Command-line interface for [**remark**][remark].
44

@@ -89,6 +89,10 @@ Examples:
8989

9090
[coverage-status]: https://codecov.io/github/remarkjs/remark
9191

92+
[dl-badge]: https://img.shields.io/npm/dm/remark-cli.svg
93+
94+
[dl]: https://www.npmjs.com/package/remark-cli
95+
9296
[chat-badge]: https://img.shields.io/gitter/room/remarkjs/Lobby.svg
9397

9498
[chat]: https://gitter.im/remarkjs/Lobby
File renamed without changes.

packages/remark-parse/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,13 @@
4040
"vfile-location": "^2.0.0",
4141
"xtend": "^4.0.1"
4242
},
43+
"devDependencies": {
44+
"tape": "^4.9.1",
45+
"unified": "^7.0.0",
46+
"vfile": "^3.0.0"
47+
},
48+
"scripts": {
49+
"test": "tape test.js"
50+
},
4351
"xo": false
4452
}

packages/remark-parse/readme.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# remark-parse [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] [![Chat][chat-badge]][chat]
1+
# remark-parse [![Travis][build-badge]][build-status] [![Coverage][coverage-badge]][coverage-status] [![Downloads][dl-badge]][dl] [![Size][size-badge]][size] [![Chat][chat-badge]][chat]
22

33
[Parser][] for [**unified**][unified]. Parses markdown to an
44
[**MDAST**][mdast] syntax tree. Used in the [**remark**
@@ -421,6 +421,14 @@ Preferably, just use [this plugin](https://github.com/zestedesavoir/zmarkdown/tr
421421

422422
[coverage-status]: https://codecov.io/github/remarkjs/remark
423423

424+
[dl-badge]: https://img.shields.io/npm/dm/remark-parse.svg
425+
426+
[dl]: https://www.npmjs.com/package/remark-parse
427+
428+
[size-badge]: https://img.shields.io/bundlephobia/minzip/remark-parse.svg
429+
430+
[size]: https://bundlephobia.com/result?p=remark-parse
431+
424432
[chat-badge]: https://img.shields.io/gitter/room/remarkjs/Lobby.svg
425433

426434
[chat]: https://gitter.im/remarkjs/Lobby
Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,24 @@ var path = require('path')
44
var fs = require('fs')
55
var test = require('tape')
66
var vfile = require('vfile')
7-
var remark = require('../packages/remark')
8-
var Parser = require('../packages/remark-parse').Parser
7+
var unified = require('unified')
8+
var parse = require('.')
9+
10+
var Parser = parse.Parser
911

1012
test('remark().parse(file)', function(t) {
1113
t.equal(
12-
remark().parse('Alfred').children.length,
14+
unified()
15+
.use(parse)
16+
.parse('Alfred').children.length,
1317
1,
1418
'should accept a `string`'
1519
)
1620

1721
t.throws(
1822
function() {
19-
remark()
23+
unified()
24+
.use(parse)
2025
.data('settings', {position: 0})
2126
.parse('')
2227
},
@@ -40,7 +45,8 @@ test('remark().parse(file)', function(t) {
4045

4146
t.throws(
4247
function() {
43-
remark()
48+
unified()
49+
.use(parse)
4450
.data('settings', {gfm: Infinity})
4551
.parse('')
4652
},
@@ -50,7 +56,8 @@ test('remark().parse(file)', function(t) {
5056

5157
t.throws(
5258
function() {
53-
remark()
59+
unified()
60+
.use(parse)
5461
.data('settings', {footnotes: 1})
5562
.parse('')
5663
},
@@ -60,7 +67,8 @@ test('remark().parse(file)', function(t) {
6067

6168
t.throws(
6269
function() {
63-
remark()
70+
unified()
71+
.use(parse)
6472
.data('settings', {pedantic: {}})
6573
.parse('')
6674
},
@@ -69,7 +77,8 @@ test('remark().parse(file)', function(t) {
6977
)
7078

7179
t.deepEqual(
72-
remark()
80+
unified()
81+
.use(parse)
7382
.data('settings', {position: false})
7483
.parse('<foo></foo>'),
7584
{
@@ -88,7 +97,8 @@ test('remark().parse(file)', function(t) {
8897
)
8998

9099
t.deepEqual(
91-
remark()
100+
unified()
101+
.use(parse)
92102
.data('settings', {position: false, blocks: ['foo']})
93103
.parse('<foo></foo>'),
94104
{
@@ -99,7 +109,9 @@ test('remark().parse(file)', function(t) {
99109
)
100110

101111
t.test('should throw parse errors', function(st) {
102-
var processor = remark().use(plugin)
112+
var processor = unified()
113+
.use(parse)
114+
.use(plugin)
103115

104116
st.plan(5)
105117

@@ -130,7 +142,9 @@ test('remark().parse(file)', function(t) {
130142
})
131143

132144
t.test('should warn when missing locators', function(st) {
133-
var processor = remark().use(plugin)
145+
var processor = unified()
146+
.use(parse)
147+
.use(plugin)
134148

135149
st.throws(function() {
136150
processor.parse(vfile('Hello *World*!'))
@@ -161,7 +175,9 @@ test('remark().parse(file)', function(t) {
161175
var notTerminated =
162176
'Named character references must be terminated by a semicolon'
163177

164-
remark().parse(file)
178+
unified()
179+
.use(parse)
180+
.parse(file)
165181

166182
st.deepEqual(file.messages.map(String), [
167183
'1:13: Named character references must be known',
@@ -187,7 +203,8 @@ test('remark().parse(file)', function(t) {
187203
})
188204

189205
t.test('should be able to set options', function(st) {
190-
var tree = remark()
206+
var tree = unified()
207+
.use(parse)
191208
.use(plugin)
192209
.parse(['<!-- commonmark -->', '', '1) Hello World', ''].join('\n'))
193210

packages/remark-stringify/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,15 @@
3939
"unherit": "^1.0.4",
4040
"xtend": "^4.0.1"
4141
},
42+
"devDependencies": {
43+
"tape": "^4.9.1",
44+
"unified": "^7.0.0",
45+
"unist-builder": "^1.0.3",
46+
"unist-util-visit": "^1.4.0",
47+
"wcwidth": "^1.0.1"
48+
},
49+
"scripts": {
50+
"test": "tape test.js"
51+
},
4252
"xo": false
4353
}

packages/remark-stringify/readme.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# remark-stringify [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] [![Chat][chat-badge]][chat]
1+
# remark-stringify [![Travis][build-badge]][build-status] [![Coverage][coverage-badge]][coverage-status] [![Downloads][dl-badge]][dl] [![Size][size-badge]][size] [![Chat][chat-badge]][chat]
22

33
[Compiler][] for [**unified**][unified]. Stringifies an
44
[**MDAST**][mdast] syntax tree to markdown. Used in the [**remark**
@@ -234,6 +234,14 @@ Stringify `node`.
234234

235235
[coverage-status]: https://codecov.io/github/remarkjs/remark
236236

237+
[dl-badge]: https://img.shields.io/npm/dm/remark-stringify.svg
238+
239+
[dl]: https://www.npmjs.com/package/remark-stringify
240+
241+
[size-badge]: https://img.shields.io/bundlephobia/minzip/remark-stringify.svg
242+
243+
[size]: https://bundlephobia.com/result?p=remark-stringify
244+
237245
[chat-badge]: https://img.shields.io/gitter/room/remarkjs/Lobby.svg
238246

239247
[chat]: https://gitter.im/remarkjs/Lobby

0 commit comments

Comments
 (0)