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 authored and Myles Borins committed 2018-05-22 14:09:48 -04:00
1 parent 678b7544df
commit 38fc741c36
2 files changed
+2 -17

No files matched your search

+2 -1
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);
-16
View File
@@ -1,16 +0,0 @@
'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/
'node_modules',
'eslint',
'node_modules',
'js-yaml'
);
module.exports = require(realJSYaml);