diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-04 04:44:44 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-04 04:44:44 +0800 |
commit | df4db8fa4c19d2ef0a311d201061ba732ce0eb97 (patch) | |
tree | e5fcbc5612296eaa8b368c264259001e0172e4f1 /packages/connect | |
parent | e11e26a35274a96fd2d4b7f37e60b89220115994 (diff) | |
parent | bd85fe0af3ce201710f92b995cf25dfc96fba953 (diff) | |
download | dexon-sol-tools-df4db8fa4c19d2ef0a311d201061ba732ce0eb97.tar dexon-sol-tools-df4db8fa4c19d2ef0a311d201061ba732ce0eb97.tar.gz dexon-sol-tools-df4db8fa4c19d2ef0a311d201061ba732ce0eb97.tar.bz2 dexon-sol-tools-df4db8fa4c19d2ef0a311d201061ba732ce0eb97.tar.lz dexon-sol-tools-df4db8fa4c19d2ef0a311d201061ba732ce0eb97.tar.xz dexon-sol-tools-df4db8fa4c19d2ef0a311d201061ba732ce0eb97.tar.zst dexon-sol-tools-df4db8fa4c19d2ef0a311d201061ba732ce0eb97.zip |
Merge branch '0x.js/updateTypeDoc' into extractDocs
* 0x.js/updateTypeDoc:
Fix comments
Add comments
Don't need any external packages for 0x connect docs yet
Instead of adding `@0xproject/types` to tsconfig.json, let's only add it when calling TypeDoc
Fix styling
Make prettier ignore postpublish_utils
Update yarn.lock
Diffstat (limited to 'packages/connect')
-rw-r--r-- | packages/connect/package.json | 2 | ||||
-rw-r--r-- | packages/connect/scripts/postpublish.js | 8 | ||||
-rw-r--r-- | packages/connect/scripts/stagedocs.js | 8 |
3 files changed, 15 insertions, 3 deletions
diff --git a/packages/connect/package.json b/packages/connect/package.json index 9cc41a10d..5ee2dcdcf 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -15,7 +15,7 @@ "build:watch": "tsc -w", "build": "tsc", "clean": "shx rm -rf _bundles lib test_temp", - "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH", + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES", "upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json", "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", diff --git a/packages/connect/scripts/postpublish.js b/packages/connect/scripts/postpublish.js index 01c349cb8..e447615f9 100644 --- a/packages/connect/scripts/postpublish.js +++ b/packages/connect/scripts/postpublish.js @@ -1,10 +1,16 @@ const execAsync = require('async-child-process').execAsync; const postpublish_utils = require('../../../scripts/postpublish_utils'); const packageJSON = require('../package.json'); +const tsConfig = require('../tsconfig.json'); const cwd = __dirname + '/..'; const subPackageName = packageJSON.name; const S3BucketPath = 's3://connect-docs-jsons/'; +// Include any external packages that are part of the @0xproject/connect public interface +// to this array so that TypeDoc picks it up and adds it to the Docs JSON +const fileIncludes = [...tsConfig.include]; +const fileIncludesAdjusted = postpublish_utils.adjustFileIncludePaths(fileIncludes, __dirname); +const projectFiles = fileIncludesAdjusted.join(' '); let tag; let version; @@ -19,7 +25,7 @@ postpublish_utils .then(function(release) { console.log('POSTPUBLISH: Release successful, generating docs...'); const jsonFilePath = __dirname + '/../' + postpublish_utils.generatedDocsDirectoryName + '/index.json'; - return execAsync('JSON_FILE_PATH=' + jsonFilePath + ' yarn docs:json', { + return execAsync('JSON_FILE_PATH=' + jsonFilePath + ' PROJECT_FILES="' + projectFiles + '" yarn docs:json', { cwd, }); }) diff --git a/packages/connect/scripts/stagedocs.js b/packages/connect/scripts/stagedocs.js index c8f44d90f..58272ab86 100644 --- a/packages/connect/scripts/stagedocs.js +++ b/packages/connect/scripts/stagedocs.js @@ -1,12 +1,18 @@ const execAsync = require('async-child-process').execAsync; const postpublish_utils = require('../../../scripts/postpublish_utils'); +const tsConfig = require('../tsconfig.json'); const cwd = __dirname + '/..'; const S3BucketPath = 's3://staging-connect-docs-jsons/'; const jsonFilePath = __dirname + '/../' + postpublish_utils.generatedDocsDirectoryName + '/index.json'; const version = process.env.DOCS_VERSION; +// Include any external packages that are part of the @0xproject/connect public interface +// to this array so that TypeDoc picks it up and adds it to the Docs JSON +const fileIncludes = [...tsConfig.include]; +const fileIncludesAdjusted = postpublish_utils.adjustFileIncludePaths(fileIncludes, __dirname); +const projectFiles = fileIncludesAdjusted.join(' '); -execAsync('JSON_FILE_PATH=' + jsonFilePath + ' yarn docs:json', { +execAsync('JSON_FILE_PATH=' + jsonFilePath + ' PROJECT_FILES="' + projectFiles + '" yarn docs:json', { cwd, }) .then(function(result) { |