Merge branch 'development' into extractDocs
* development: Also show staging 0x.js docs on development Fix source links in docs with a hack to support old and new versions of the TypeDoc JSON files remove from devDeps Remove date for now Add ethers typescript typings to 0x.js deps. The library works without this atm since another dep of 0x.js has it as a dep. But it's more robust to have it here. Add missing instructions to add external types to tsconfig.json after installing the package
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## v0.33.1 - _TBD, 2018_
|
||||||
|
|
||||||
|
* Add missing EthersJs typescript typings as dependency
|
||||||
|
|
||||||
## v0.33.0 - _March 4, 2018_
|
## v0.33.0 - _March 4, 2018_
|
||||||
|
|
||||||
* Validate and lowercase all addresses in public methods (#373)
|
* Validate and lowercase all addresses in public methods (#373)
|
||||||
|
@@ -18,6 +18,15 @@ npm install 0x.js --save
|
|||||||
import { ZeroEx } from '0x.js';
|
import { ZeroEx } from '0x.js';
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
||||||
|
|
||||||
|
```
|
||||||
|
"include": [
|
||||||
|
"./node_modules/web3-typescript-typings/index.d.ts",
|
||||||
|
"./node_modules/ethers-typescript-typings/index.d.ts"
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
#### UMD:
|
#### UMD:
|
||||||
|
|
||||||
**Install**
|
**Install**
|
||||||
|
@@ -61,7 +61,6 @@
|
|||||||
"copyfiles": "^1.2.0",
|
"copyfiles": "^1.2.0",
|
||||||
"coveralls": "^3.0.0",
|
"coveralls": "^3.0.0",
|
||||||
"dirty-chai": "^2.0.1",
|
"dirty-chai": "^2.0.1",
|
||||||
"ethers-typescript-typings": "^0.0.2",
|
|
||||||
"json-loader": "^0.5.4",
|
"json-loader": "^0.5.4",
|
||||||
"mocha": "^4.0.1",
|
"mocha": "^4.0.1",
|
||||||
"npm-run-all": "^4.1.2",
|
"npm-run-all": "^4.1.2",
|
||||||
@@ -93,6 +92,7 @@
|
|||||||
"ethereumjs-blockstream": "^2.0.6",
|
"ethereumjs-blockstream": "^2.0.6",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"ethers-contracts": "^2.2.1",
|
"ethers-contracts": "^2.2.1",
|
||||||
|
"ethers-typescript-typings": "^0.0.2",
|
||||||
"js-sha3": "^0.7.0",
|
"js-sha3": "^0.7.0",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"uuid": "^3.1.0",
|
"uuid": "^3.1.0",
|
||||||
|
@@ -8,6 +8,14 @@ Standard type and schema assertions to be used across all 0x projects and packag
|
|||||||
yarn add @0xproject/assert
|
yarn add @0xproject/assert
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
||||||
|
|
||||||
|
```
|
||||||
|
"include": [
|
||||||
|
"./node_modules/web3-typescript-typings/index.d.ts",
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
@@ -8,6 +8,15 @@ BaseContract to derive all auto-generated wrappers from
|
|||||||
yarn add @0xproject/base-contract
|
yarn add @0xproject/base-contract
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
||||||
|
|
||||||
|
```
|
||||||
|
"include": [
|
||||||
|
"./node_modules/web3-typescript-typings/index.d.ts",
|
||||||
|
"./node_modules/ethers-typescript-typings/index.d.ts"
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
@@ -8,6 +8,14 @@ This repository contains a Javascript library that makes it easy to interact wit
|
|||||||
yarn add @0xproject/connect
|
yarn add @0xproject/connect
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
||||||
|
|
||||||
|
```
|
||||||
|
"include": [
|
||||||
|
"./node_modules/web3-typescript-typings/index.d.ts",
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
* [Docs](https://0xproject.com/docs/connect)
|
* [Docs](https://0xproject.com/docs/connect)
|
||||||
|
@@ -7,3 +7,11 @@ Dev utils to be shared across 0x projects and packages
|
|||||||
```bash
|
```bash
|
||||||
yarn add @0xproject/dev-utils
|
yarn add @0xproject/dev-utils
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
||||||
|
|
||||||
|
```
|
||||||
|
"include": [
|
||||||
|
"./node_modules/web3-typescript-typings/index.d.ts",
|
||||||
|
]
|
||||||
|
```
|
||||||
|
@@ -10,6 +10,14 @@ We have written up a [Wiki](https://0xproject.com/wiki#Web3-Provider-Examples) a
|
|||||||
yarn add @0xproject/subproviders
|
yarn add @0xproject/subproviders
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
||||||
|
|
||||||
|
```
|
||||||
|
"include": [
|
||||||
|
"./node_modules/web3-typescript-typings/index.d.ts",
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Simply import the subprovider you are interested in using:
|
Simply import the subprovider you are interested in using:
|
||||||
|
@@ -8,6 +8,14 @@ Typescript types shared across 0x projects and packages
|
|||||||
yarn add -D @0xproject/types
|
yarn add -D @0xproject/types
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
||||||
|
|
||||||
|
```
|
||||||
|
"include": [
|
||||||
|
"./node_modules/web3-typescript-typings/index.d.ts",
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
@@ -8,6 +8,14 @@ Utils to be shared across 0x projects and packages
|
|||||||
yarn add @0xproject/utils
|
yarn add @0xproject/utils
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
||||||
|
|
||||||
|
```
|
||||||
|
"include": [
|
||||||
|
"./node_modules/web3-typescript-typings/index.d.ts",
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
@@ -8,6 +8,14 @@ Wrapped version of web3 with a nicer interface that is used across 0x projects a
|
|||||||
yarn add @0xproject/web3-wrapper
|
yarn add @0xproject/web3-wrapper
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
||||||
|
|
||||||
|
```
|
||||||
|
"include": [
|
||||||
|
"./node_modules/web3-typescript-typings/index.d.ts",
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
@@ -14,11 +14,13 @@ import { constants } from 'ts/utils/constants';
|
|||||||
import { docUtils } from 'ts/utils/doc_utils';
|
import { docUtils } from 'ts/utils/doc_utils';
|
||||||
import { Translate } from 'ts/utils/translate';
|
import { Translate } from 'ts/utils/translate';
|
||||||
|
|
||||||
|
const ZERO_EX_JS_VERSION_MISSING_TOPLEVEL_PATH = '0.32.4';
|
||||||
|
|
||||||
|
const isDevelopment = configs.ENVIRONMENT === Environments.DEVELOPMENT;
|
||||||
const docIdToS3BucketName: { [id: string]: string } = {
|
const docIdToS3BucketName: { [id: string]: string } = {
|
||||||
[DocPackages.ZeroExJs]: '0xjs-docs-jsons',
|
[DocPackages.ZeroExJs]: isDevelopment ? 'staging-0xjs-docs-jsons' : '0xjs-docs-jsons',
|
||||||
[DocPackages.SmartContracts]: 'smart-contracts-docs-json',
|
[DocPackages.SmartContracts]: 'smart-contracts-docs-json',
|
||||||
[DocPackages.Connect]:
|
[DocPackages.Connect]: isDevelopment ? 'staging-connect-docs-jsons' : 'connect-docs-jsons',
|
||||||
configs.ENVIRONMENT === Environments.DEVELOPMENT ? 'staging-connect-docs-jsons' : 'connect-docs-jsons',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const docIdToSubpackageName: { [id: string]: string } = {
|
const docIdToSubpackageName: { [id: string]: string } = {
|
||||||
@@ -121,13 +123,22 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> {
|
|||||||
}
|
}
|
||||||
private _getSourceUrl() {
|
private _getSourceUrl() {
|
||||||
const url = this.props.docsInfo.packageUrl;
|
const url = this.props.docsInfo.packageUrl;
|
||||||
const pkg = docIdToSubpackageName[this.props.docsInfo.id];
|
let pkg = docIdToSubpackageName[this.props.docsInfo.id];
|
||||||
let tagPrefix = pkg;
|
let tagPrefix = pkg;
|
||||||
const packagesWithNamespace = ['connect'];
|
const packagesWithNamespace = ['connect'];
|
||||||
if (_.includes(packagesWithNamespace, pkg)) {
|
if (_.includes(packagesWithNamespace, pkg)) {
|
||||||
tagPrefix = `@0xproject/${pkg}`;
|
tagPrefix = `@0xproject/${pkg}`;
|
||||||
}
|
}
|
||||||
const sourceUrl = `${url}/blob/${tagPrefix}%40${this.props.docsVersion}/packages/${pkg}`;
|
// HACK: The following three lines exist for backward compatibility reasons
|
||||||
|
// Before exporting types from other packages as part of the 0x.js interface,
|
||||||
|
// all TypeDoc generated paths omitted the topLevel `0x.js` segment. Now it
|
||||||
|
// adds it, and for that reason, we need to make sure we don't add it twice in
|
||||||
|
// the source links we generate.
|
||||||
|
const semvers = semverSort.desc([this.props.docsVersion, ZERO_EX_JS_VERSION_MISSING_TOPLEVEL_PATH]);
|
||||||
|
const isVersionAfterTopLevelPathChange = semvers[0] !== ZERO_EX_JS_VERSION_MISSING_TOPLEVEL_PATH;
|
||||||
|
pkg = this.props.docsInfo.id === DocPackages.ZeroExJs && isVersionAfterTopLevelPathChange ? '' : `/${pkg}`;
|
||||||
|
|
||||||
|
const sourceUrl = `${url}/blob/${tagPrefix}%40${this.props.docsVersion}/packages${pkg}`;
|
||||||
return sourceUrl;
|
return sourceUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user