Browse Source

corrected paths to node_modules folder used by benchmark, updated contributing docs for benchmark

pull/971/head
Katie Liu 6 months ago
parent
commit
93f99bebd7
  1. 12
      CONTRIBUTING.md
  2. 2
      benchmark/implementations/commonmark-reference/index.js
  3. 2
      benchmark/implementations/markdown-it-2.2.1-commonmark/index.js
  4. 2
      benchmark/implementations/marked/index.js

12
CONTRIBUTING.md

@ -1,8 +1,16 @@
### If you commit changes:
1. Make sure all tests pass.
2. Run `./benchmark/benchmark.js`, make sure that performance not degraded.
3. DON'T include auto-generated browser files to commit.
2. Install dependencies for benchmark:
```
npm i benchmark
npm i commonmark
npm i marked
```
3. Run `./benchmark/benchmark.js`, make sure that performance not degraded.
4. DON'T include auto-generated browser files to commit.
### Other things:

2
benchmark/implementations/commonmark-reference/index.js

@ -1,6 +1,6 @@
'use strict';
var commonmark = require('../../extra/lib/node_modules/commonmark');
var commonmark = require('../../../node_modules/commonmark');
var parser = new commonmark.Parser();
var renderer = new commonmark.HtmlRenderer();

2
benchmark/implementations/markdown-it-2.2.1-commonmark/index.js

@ -1,6 +1,6 @@
'use strict';
var md = require('../../extra/lib/node_modules/markdown-it')('commonmark');
var md = require('../../../node_modules/markdown-it')('commonmark');
exports.run = function (data) {
return md.render(data);

2
benchmark/implementations/marked/index.js

@ -1,6 +1,6 @@
'use strict';
var marked = require('../../extra/lib/node_modules/marked');
var marked = require('../../../node_modules/marked');
exports.run = function (data) {
return marked(data);

Loading…
Cancel
Save