From 839e5895e41c849d69b493ad2a1e85c8504c38b2 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sat, 3 Mar 2018 21:34:13 +0100 Subject: Instead of adding `@0xproject/types` to tsconfig.json, let's only add it when calling TypeDoc --- scripts/postpublish_utils.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'scripts') diff --git a/scripts/postpublish_utils.js b/scripts/postpublish_utils.js index e67d4d896..6f990eb5e 100644 --- a/scripts/postpublish_utils.js +++ b/scripts/postpublish_utils.js @@ -1,3 +1,4 @@ +const _ = require('lodash'); const execAsync = require('async-child-process').execAsync; const semverSort = require('semver-sort'); const publishRelease = require('publish-release'); @@ -61,5 +62,15 @@ module.exports = { throw err; }); }, + adjustFileIncludePaths: function(fileIncludes, cwd) { + const fileIncludesAdjusted = _.map(fileIncludes, fileInclude => { + if (_.startsWith(fileInclude, '../')) { + return cwd + '/../' + fileInclude; + } else if (_.startsWith('./')) { + return cwd + '/../' + fileInclude; + } + }); + return fileIncludesAdjusted; + }, generatedDocsDirectoryName, }; -- cgit