aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/postpublish_utils.js
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-05 13:20:15 +0800
committerFabio Berger <me@fabioberger.com>2018-03-05 13:20:15 +0800
commit1817f6eaf63a5fa4302ad9ef41ad13b1555a8733 (patch)
tree1cfcfb9ba09a16890d982a61b0e7159ba97face8 /scripts/postpublish_utils.js
parentdf4db8fa4c19d2ef0a311d201061ba732ce0eb97 (diff)
parent699c0c3e05d3a882c8a59fec4f035ec25cb43c9e (diff)
downloaddexon-sol-tools-1817f6eaf63a5fa4302ad9ef41ad13b1555a8733.tar
dexon-sol-tools-1817f6eaf63a5fa4302ad9ef41ad13b1555a8733.tar.gz
dexon-sol-tools-1817f6eaf63a5fa4302ad9ef41ad13b1555a8733.tar.bz2
dexon-sol-tools-1817f6eaf63a5fa4302ad9ef41ad13b1555a8733.tar.lz
dexon-sol-tools-1817f6eaf63a5fa4302ad9ef41ad13b1555a8733.tar.xz
dexon-sol-tools-1817f6eaf63a5fa4302ad9ef41ad13b1555a8733.tar.zst
dexon-sol-tools-1817f6eaf63a5fa4302ad9ef41ad13b1555a8733.zip
Merge branch 'development' into extractDocs
* development: (22 commits) Fix bugs in postpublish_utils.js Update @0xproject/utils in top-level package.json Changelog tweaks Publish Updated CHANGELOGS Fix typo Add PR number to changelog entry Add changelog update to subproviders package Add `numberOfAccounts` param to `LedgerSubprovider` method `getAccountsAsync` and add tests Remove unnecessary type assertion Move web3 typings from devDeps to deps remove extrenuous comma Add PR number Add changelog entries from types and utils Add changelog entry to subproviders Remove extra comma Move web3 and ethers types to deps for utils package Make web3 typings a dep for web3Wrapper Make web3 typings a dep for subproviders reorder deps ... # Conflicts: # packages/website/package.json
Diffstat (limited to 'scripts/postpublish_utils.js')
-rw-r--r--scripts/postpublish_utils.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/postpublish_utils.js b/scripts/postpublish_utils.js
index 6f990eb5e..0a8c6f94d 100644
--- a/scripts/postpublish_utils.js
+++ b/scripts/postpublish_utils.js
@@ -64,11 +64,21 @@ module.exports = {
},
adjustFileIncludePaths: function(fileIncludes, cwd) {
const fileIncludesAdjusted = _.map(fileIncludes, fileInclude => {
+ let path;
if (_.startsWith(fileInclude, '../')) {
- return cwd + '/../' + fileInclude;
- } else if (_.startsWith('./')) {
- return cwd + '/../' + fileInclude;
+ path = cwd + '/../' + fileInclude;
+ } else if (_.startsWith(fileInclude, './')) {
+ path = cwd + '/../' + fileInclude.substr(2);
+ } else {
+ path = cwd + '/' + fileInclude;
}
+
+ // HACK: tsconfig.json needs wildcard directory endings as `/**/*`
+ // but TypeDoc needs it as `/**` in order to pick up files at the root
+ if (_.endsWith(path, '/**/*')) {
+ path = path.slice(0, -2);
+ }
+ return path;
});
return fileIncludesAdjusted;
},