summaryrefslogtreecommitdiff
path: root/tools/doc
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-05-13 17:47:55 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-05-16 18:44:54 +0300
commit01e2f48c077f6551dbb3acd5f5907690d9cf80bd (patch)
tree48461334c14652dcc9efaa93d1c7083c43d63817 /tools/doc
parentea01d305f65147325866f68a93d511d076a82016 (diff)
downloadandroid-node-v8-01e2f48c077f6551dbb3acd5f5907690d9cf80bd.tar.gz
android-node-v8-01e2f48c077f6551dbb3acd5f5907690d9cf80bd.tar.bz2
android-node-v8-01e2f48c077f6551dbb3acd5f5907690d9cf80bd.zip
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>
Diffstat (limited to 'tools/doc')
-rw-r--r--tools/doc/common.js3
-rw-r--r--tools/doc/node_modules/js-yaml/index.js16
2 files changed, 2 insertions, 17 deletions
diff --git a/tools/doc/common.js b/tools/doc/common.js
index 553b52935f..813935f23b 100644
--- a/tools/doc/common.js
+++ b/tools/doc/common.js
@@ -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);
diff --git a/tools/doc/node_modules/js-yaml/index.js b/tools/doc/node_modules/js-yaml/index.js
deleted file mode 100644
index 476b3a0d48..0000000000
--- a/tools/doc/node_modules/js-yaml/index.js
+++ /dev/null
@@ -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);