From 0149cb05774d43dd8fb649db83ad127a05c1e7a5 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 1 May 2016 16:07:29 +0200 Subject: [PATCH] tools: add mock-y js-yaml dependency to doctool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel --- tools/doc/node_modules/js-yaml/index.js | 15 +++++++++++++++ tools/doc/package.json | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 tools/doc/node_modules/js-yaml/index.js diff --git a/tools/doc/node_modules/js-yaml/index.js b/tools/doc/node_modules/js-yaml/index.js new file mode 100644 index 00000000000000..620bc293ffe032 --- /dev/null +++ b/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); diff --git a/tools/doc/package.json b/tools/doc/package.json index d87c9345b33f2e..0dda4b971cf14f 100644 --- a/tools/doc/package.json +++ b/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": {},