Fix failing doc generation tests
This commit is contained in:
parent
003ab1e5b3
commit
f0e4837983
@ -14,7 +14,6 @@
|
||||
"report_coverage": "lcov-result-merger './{packages/*/coverage/lcov.info,python-packages/*/.coverage}' | coveralls",
|
||||
"test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js",
|
||||
"test:installation:local": "IS_LOCAL_PUBLISH=true node ./packages/monorepo-scripts/lib/test_installation.js",
|
||||
"test:publish:circleci:comment": "HACK(albrow) We need an automated way to login to npm and echo+sleep piped to stdin was the only way I could find to do it.",
|
||||
"test:publish:circleci": "yarn npm-cli-login -u test -p test -e test@example.com -r http://localhost:4873 && IS_LOCAL_PUBLISH=true run-s script:publish test:installation:local",
|
||||
"run:publish": "run-s install:all build:monorepo_scripts script:prepublish_checks rebuild:no_website script:publish",
|
||||
"run:publish:local": "IS_LOCAL_PUBLISH=true yarn run:publish",
|
||||
|
@ -42,7 +42,9 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@0xproject/contract-addresses": "^1.0.0",
|
||||
"@0xproject/abi-gen": "^1.0.13",
|
||||
"@0xproject/abi-gen-wrappers": "^1.0.0",
|
||||
"@0xproject/dev-utils": "^1.0.12",
|
||||
"@0xproject/migrations": "^1.0.14",
|
||||
"@0xproject/monorepo-scripts": "^1.0.11",
|
||||
|
6
packages/0x.js/src/globals.d.ts
vendored
6
packages/0x.js/src/globals.d.ts
vendored
@ -1,6 +0,0 @@
|
||||
declare module '*.json' {
|
||||
const json: any;
|
||||
/* tslint:disable */
|
||||
export default json;
|
||||
/* tslint:enable */
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
export { ContractAddresses } from '@0xproject/contract-addresses';
|
||||
|
||||
export { assetDataUtils, signatureUtils, generatePseudoRandomSalt, orderHashUtils } from '@0xproject/order-utils';
|
||||
|
||||
export {
|
||||
@ -18,6 +20,16 @@ export {
|
||||
TransactionOpts,
|
||||
OrderStatus,
|
||||
OrderInfo,
|
||||
EventCallback,
|
||||
DecodedLogEvent,
|
||||
TransactionEncoder,
|
||||
BalanceAndAllowance,
|
||||
OrderAndTraderInfo,
|
||||
TraderInfo,
|
||||
ValidateOrderFillableOpts,
|
||||
} from '@0xproject/contract-wrappers';
|
||||
|
||||
export {
|
||||
WETH9Events,
|
||||
WETH9WithdrawalEventArgs,
|
||||
WETH9ApprovalEventArgs,
|
||||
@ -38,16 +50,9 @@ export {
|
||||
ExchangeSignatureValidatorApprovalEventArgs,
|
||||
ExchangeFillEventArgs,
|
||||
ExchangeCancelEventArgs,
|
||||
ExchangeEvents,
|
||||
EventCallback,
|
||||
DecodedLogEvent,
|
||||
ExchangeEventArgs,
|
||||
TransactionEncoder,
|
||||
BalanceAndAllowance,
|
||||
OrderAndTraderInfo,
|
||||
TraderInfo,
|
||||
ValidateOrderFillableOpts,
|
||||
} from '@0xproject/contract-wrappers';
|
||||
ExchangeEvents,
|
||||
} from '@0xproject/abi-gen-wrappers';
|
||||
|
||||
export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0xproject/order-watcher';
|
||||
|
||||
|
@ -3,5 +3,5 @@
|
||||
"compilerOptions": {
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["./src/**/*", "./test/**/*"]
|
||||
"include": ["./src/**/*"]
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
export { ContractAddresses } from '@0xproject/contract-addresses';
|
||||
|
||||
export {
|
||||
WETH9Events,
|
||||
WETH9WithdrawalEventArgs,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { readFileSync, writeFileSync } from 'fs';
|
||||
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
||||
import * as _ from 'lodash';
|
||||
import * as path from 'path';
|
||||
import { exec as execAsync } from 'promisify-child-process';
|
||||
@ -103,6 +103,9 @@ export class DocGenerateAndUploadUtils {
|
||||
switch (node.kind) {
|
||||
case ts.SyntaxKind.ExportDeclaration: {
|
||||
const exportClause = (node as any).exportClause;
|
||||
if (_.isUndefined(exportClause)) {
|
||||
return;
|
||||
}
|
||||
const exportPath = exportClause.parent.moduleSpecifier.text;
|
||||
_.each(exportClause.elements, element => {
|
||||
const exportItem = element.name.escapedText;
|
||||
@ -187,7 +190,11 @@ export class DocGenerateAndUploadUtils {
|
||||
const typeDocExtraFileIncludes: string[] = this._getTypeDocFileIncludesForPackage();
|
||||
|
||||
// In order to avoid TS errors, we need to pass TypeDoc the package's global.d.ts file
|
||||
typeDocExtraFileIncludes.push(path.join(this._packagePath, 'src', 'globals.d.ts'));
|
||||
// if it exists.
|
||||
const globalTypeDefinitionsPath = path.join(this._packagePath, 'src', 'globals.d.ts');
|
||||
if (existsSync(globalTypeDefinitionsPath)) {
|
||||
typeDocExtraFileIncludes.push(globalTypeDefinitionsPath);
|
||||
}
|
||||
|
||||
utils.log(`GENERATE_UPLOAD_DOCS: Generating Typedoc JSON for ${this._packageName}...`);
|
||||
const jsonFilePath = path.join(this._packagePath, 'generated_docs', 'index.json');
|
||||
|
@ -12,6 +12,7 @@ export {
|
||||
|
||||
export { OnOrderStateChangeCallback, OrderWatcherConfig } from './types';
|
||||
|
||||
export { ContractAddresses } from '@0xproject/contract-addresses';
|
||||
export { SignedOrder } from '@0xproject/types';
|
||||
export {
|
||||
JSONRPCRequestPayload,
|
||||
|
Loading…
x
Reference in New Issue
Block a user