diff options
author | Brandon Millman <brandon@0xproject.com> | 2018-02-15 06:45:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-15 06:45:33 +0800 |
commit | 0dfb36e6759e67a82ed720bf31185aadfbea2c63 (patch) | |
tree | 62df7f1fb52645d150c3b95825ec263b6fa4a5a4 /packages/connect | |
parent | 95a9d7730182d4f8ed7b4dd953b4bb78f22d59d6 (diff) | |
parent | 8201d5d1f8dbba530b71b7db8967e51406b8fe64 (diff) | |
download | dexon-0x-contracts-0dfb36e6759e67a82ed720bf31185aadfbea2c63.tar.gz dexon-0x-contracts-0dfb36e6759e67a82ed720bf31185aadfbea2c63.tar.zst dexon-0x-contracts-0dfb36e6759e67a82ed720bf31185aadfbea2c63.zip |
Merge pull request #398 from 0xProject/feature/website/stage-documentation
Add support for intersection types and staged connect documentation
Diffstat (limited to 'packages/connect')
-rw-r--r-- | packages/connect/scripts/stagedocs.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/connect/scripts/stagedocs.js b/packages/connect/scripts/stagedocs.js new file mode 100644 index 000000000..868112a37 --- /dev/null +++ b/packages/connect/scripts/stagedocs.js @@ -0,0 +1,24 @@ +const execAsync = require('async-child-process').execAsync; +const postpublish_utils = require('../../../scripts/postpublish_utils'); + +const cwd = __dirname + '/..'; +const S3BucketPath = 's3://staging-connect-docs-jsons/'; +const jsonFilePath = __dirname + '/../' + postpublish_utils.generatedDocsDirectoryName + '/index.json'; +const version = process.env.DOCS_VERSION; + +execAsync('JSON_FILE_PATH=' + jsonFilePath + ' PROJECT_DIR=' + __dirname + '/.. yarn docs:json', { + cwd, +}) +.then(function(result) { + if (result.stderr !== '') { + throw new Error(result.stderr); + } + const fileName = 'v' + version + '.json'; + const s3Url = S3BucketPath + fileName; + return execAsync('S3_URL=' + s3Url + ' yarn upload_docs_json', { + cwd, + }); +}) +.catch(function(err) { + console.log(err); +}); |