Added doc json generation and uploading to Web3Wrapper package

This commit is contained in:
Fabio Berger
2018-03-14 16:36:00 +01:00
parent a86f8a81a2
commit 642a2cf165
3 changed files with 22 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
## @0xproject/web3-wrapper ## @0xproject/web3-wrapper
Wrapped version of web3 with a nicer interface that is used across 0x projects and packages Wrapped version of web3 with a nicer interface that is used across 0x projects and packages. Visit [the docs](0xproject.com/docs/web3_wrapper).
## Installation ## Installation

View File

@@ -8,7 +8,18 @@
"build:watch": "tsc -w", "build:watch": "tsc -w",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib scripts", "clean": "shx rm -rf lib scripts",
"lint": "tslint --project . 'src/**/*.ts'" "lint": "tslint --project . 'src/**/*.ts'",
"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"
},
"config": {
"postpublish": {
"docPublishConfigs": {
"extraFileIncludes": ["../types/src/index.ts"],
"s3BucketPath": "s3://web3-wrapper-docs-json/",
"s3StagingBucketPath": "s3://staging-web3-wrapper-docs-json/"
}
}
}, },
"license": "Apache-2.0", "license": "Apache-2.0",
"repository": { "repository": {
@@ -27,6 +38,7 @@
"npm-run-all": "^4.1.2", "npm-run-all": "^4.1.2",
"shx": "^0.2.2", "shx": "^0.2.2",
"tslint": "5.8.0", "tslint": "5.8.0",
"typedoc": "0xProject/typedoc",
"typescript": "2.7.1" "typescript": "2.7.1"
}, },
"dependencies": { "dependencies": {

View File

@@ -0,0 +1,8 @@
import { postpublishUtils } from '@0xproject/monorepo-scripts';
import * as packageJSON from '../package.json';
import * as tsConfigJSON from '../tsconfig.json';
const cwd = `${__dirname}/..`;
// tslint:disable-next-line:no-floating-promises
postpublishUtils.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd);