tools: eliminate intermediate module in doctools

PR-URL: https://github.com/nodejs/node/pull/20701
Fixes: https://github.com/nodejs/node/issues/20685
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Vse Mozhet Byt 2018-05-13 17:47:55 +03:00
parent ea01d305f6
commit 01e2f48c07
2 changed files with 2 additions and 17 deletions

View File

@ -1,6 +1,7 @@
'use strict';
const yaml = require('js-yaml');
const yaml =
require(`${__dirname}/../node_modules/eslint/node_modules/js-yaml`);
function isYAMLBlock(text) {
return /^<!-- YAML/.test(text);

View File

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