mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
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:
parent
ea01d305f6
commit
01e2f48c07
@ -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
tools/doc/node_modules/js-yaml/index.js
generated
vendored
16
tools/doc/node_modules/js-yaml/index.js
generated
vendored
@ -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);
|
Loading…
Reference in New Issue
Block a user