Browse Source

tools: add mock-y js-yaml dependency to doctool

Add a hack js-yaml module to the doctool dependencies that simply
loads the one that’s included with eslint.

This helps avoiding to check in the whole dependency tree into
the core repo.

PR-URL: https://github.com/nodejs/node/pull/6495
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
v6.x
Anna Henningsen 9 years ago
committed by Evan Lucas
parent
commit
a568ad4205
  1. 15
      tools/doc/node_modules/js-yaml/index.js
  2. 3
      tools/doc/package.json

15
tools/doc/node_modules/js-yaml/index.js

@ -0,0 +1,15 @@
'use strict';
// Hack to load the js-yaml module from eslint.
// No other reason than that it’s huge.
const path = require('path');
const realJSYaml = path.resolve(
__dirname, '..', '..', '..', // tools/
'eslint',
'node_modules',
'js-yaml'
);
module.exports = require(realJSYaml);

3
tools/doc/package.json

@ -7,7 +7,8 @@
"node": ">=0.6.10"
},
"dependencies": {
"marked": "~0.1.9"
"marked": "~0.1.9",
"js-yaml": "^3.5.2"
},
"devDependencies": {},
"optionalDependencies": {},

Loading…
Cancel
Save