aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-08-30 02:15:30 +0800
committerGitHub <noreply@github.com>2018-08-30 02:15:30 +0800
commite7d5ceb9c5487a5851dbfc1f8bdbe0182fedaef2 (patch)
treed73fa81c94a066aafdd9871e3fdc9980ca6ea667
parentf44644ad9029148c43f69d666356ed9fb18de4e2 (diff)
downloaddexon-0x-contracts-e7d5ceb9c5487a5851dbfc1f8bdbe0182fedaef2.tar
dexon-0x-contracts-e7d5ceb9c5487a5851dbfc1f8bdbe0182fedaef2.tar.gz
dexon-0x-contracts-e7d5ceb9c5487a5851dbfc1f8bdbe0182fedaef2.tar.bz2
dexon-0x-contracts-e7d5ceb9c5487a5851dbfc1f8bdbe0182fedaef2.tar.lz
dexon-0x-contracts-e7d5ceb9c5487a5851dbfc1f8bdbe0182fedaef2.tar.xz
dexon-0x-contracts-e7d5ceb9c5487a5851dbfc1f8bdbe0182fedaef2.tar.zst
dexon-0x-contracts-e7d5ceb9c5487a5851dbfc1f8bdbe0182fedaef2.zip
feat: Add support for TypeScript project references (#991)
* Update all package.json and tsconfig.json * fix(contracts): Make test/utils/web3_wrapper.ts compatible with project refs * Fix webpack config for 0x.js * Fix linter errors by adding rootDir to tsconfig.json as needed * Add build:ts and watch:ts commands to package.json * Update sra-spec to work with project references * Update tsconfig.json with latest new/removed packages * Add TypeScript as devDependency at root * Add missing rootDir to forwarder-helper package * Use a separate tsconfig file for typedoc * Fix linter errors * Apply PR feedback (add comments) * Fix 0x.js tsconfig
-rw-r--r--package.json4
-rw-r--r--packages/0x.js/package.json5
-rw-r--r--packages/0x.js/tsconfig.json5
-rw-r--r--packages/0x.js/typedoc-tsconfig.json7
-rw-r--r--packages/0x.js/webpack.config.js5
-rw-r--r--packages/abi-gen/package.json3
-rw-r--r--packages/abi-gen/tsconfig.json3
-rw-r--r--packages/assert/package.json3
-rw-r--r--packages/assert/tsconfig.json3
-rw-r--r--packages/base-contract/package.json3
-rw-r--r--packages/base-contract/tsconfig.json3
-rw-r--r--packages/connect/package.json5
-rw-r--r--packages/connect/tsconfig.json3
-rw-r--r--packages/connect/typedoc-tsconfig.json7
-rw-r--r--packages/contract-wrappers/package.json5
-rw-r--r--packages/contract-wrappers/tsconfig.json3
-rw-r--r--packages/contract-wrappers/typedoc-tsconfig.json7
-rw-r--r--packages/contracts/package.json3
-rw-r--r--packages/contracts/test/utils/web3_wrapper.ts4
-rw-r--r--packages/contracts/tsconfig.json6
-rw-r--r--packages/dev-utils/package.json3
-rw-r--r--packages/dev-utils/tsconfig.json3
-rw-r--r--packages/ethereum-types/package.json5
-rw-r--r--packages/ethereum-types/tsconfig.json3
-rw-r--r--packages/ethereum-types/typedoc-tsconfig.json8
-rw-r--r--packages/fill-scenarios/package.json3
-rw-r--r--packages/fill-scenarios/tsconfig.json3
-rw-r--r--packages/forwarder-helper/package.json4
-rw-r--r--packages/forwarder-helper/tsconfig.json3
-rw-r--r--packages/forwarder-helper/typedoc-tsconfig.json7
-rw-r--r--packages/json-schemas/package.json5
-rw-r--r--packages/json-schemas/tsconfig.json5
-rw-r--r--packages/json-schemas/typedoc-tsconfig.json7
-rw-r--r--packages/metacoin/package.json3
-rw-r--r--packages/metacoin/tsconfig.json4
-rw-r--r--packages/migrations/package.json3
-rw-r--r--packages/migrations/tsconfig.json3
-rw-r--r--packages/monorepo-scripts/package.json3
-rw-r--r--packages/monorepo-scripts/tsconfig.json3
-rw-r--r--packages/order-utils/package.json6
-rw-r--r--packages/order-utils/tsconfig.json3
-rw-r--r--packages/order-utils/typedoc-tsconfig.json7
-rw-r--r--packages/order-watcher/package.json5
-rw-r--r--packages/order-watcher/tsconfig.json3
-rw-r--r--packages/order-watcher/typedoc-tsconfig.json7
-rw-r--r--packages/react-docs/package.json3
-rw-r--r--packages/react-docs/tsconfig.json5
-rw-r--r--packages/react-shared/tsconfig.json5
-rw-r--r--packages/sol-compiler/package.json5
-rw-r--r--packages/sol-compiler/tsconfig.json1
-rw-r--r--packages/sol-compiler/typedoc-tsconfig.json8
-rw-r--r--packages/sol-cov/package.json5
-rw-r--r--packages/sol-cov/tsconfig.json3
-rw-r--r--packages/sol-cov/typedoc-tsconfig.json7
-rw-r--r--packages/sol-resolver/package.json3
-rw-r--r--packages/sol-resolver/tsconfig.json3
-rw-r--r--packages/sra-report/package.json3
-rw-r--r--packages/sra-report/tsconfig.json3
-rw-r--r--packages/sra-spec/package.json12
-rw-r--r--packages/sra-spec/tsconfig.json5
-rw-r--r--packages/subproviders/package.json5
-rw-r--r--packages/subproviders/tsconfig.json3
-rw-r--r--packages/subproviders/typedoc-tsconfig.json7
-rw-r--r--packages/testnet-faucets/package.json1
-rw-r--r--packages/testnet-faucets/tsconfig.json1
-rw-r--r--packages/tslint-config/package.json3
-rw-r--r--packages/tslint-config/tsconfig.json4
-rw-r--r--packages/types/package.json3
-rw-r--r--packages/types/tsconfig.json4
-rw-r--r--packages/typescript-typings/package.json4
-rw-r--r--packages/typescript-typings/tsconfig.json3
-rw-r--r--packages/utils/package.json3
-rw-r--r--packages/utils/tsconfig.json3
-rw-r--r--packages/web3-wrapper/package.json5
-rw-r--r--packages/web3-wrapper/tsconfig.json3
-rw-r--r--packages/web3-wrapper/typedoc-tsconfig.json7
-rw-r--r--packages/website/tsconfig.json5
-rw-r--r--tsconfig.json50
-rw-r--r--typedoc-tsconfig.json16
-rw-r--r--yarn.lock61
80 files changed, 276 insertions, 182 deletions
diff --git a/package.json b/package.json
index 8d4aff4ca..04ca89fd1 100644
--- a/package.json
+++ b/package.json
@@ -23,10 +23,11 @@
"install:all": "yarn install",
"wsrun": "wsrun",
"lerna": "lerna",
- "watch": "wsrun watch_without_deps $PKG --fast-exit -r --stages --done-criteria='complete|successfully'",
"build": "wsrun build $PKG --fast-exit -r --stages",
"build:no_website": "wsrun build $PKG --fast-exit -r --stages --exclude @0xproject/website",
"build:monorepo_scripts": "PKG=@0xproject/monorepo-scripts yarn build",
+ "build:ts": "tsc -b",
+ "watch:ts": "tsc -b -w",
"clean": "wsrun clean $PKG --fast-exit -r --parallel",
"remove_node_modules": "lerna clean --yes; rm -rf node_modules",
"rebuild": "run-s clean build",
@@ -51,6 +52,7 @@
"npm-run-all": "^4.1.2",
"prettier": "^1.11.1",
"source-map-support": "^0.5.6",
+ "typescript": "3.0.1",
"wsrun": "^2.2.0"
},
"resolutions": {
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index c3adb496e..db6e2363e 100644
--- a/packages/0x.js/package.json
+++ b/packages/0x.js/package.json
@@ -15,7 +15,6 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
"build": "yarn build:all",
"build:all": "run-p build:umd:prod build:commonjs",
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
@@ -25,8 +24,8 @@
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"clean": "shx rm -rf _bundles lib test_temp src/generated_contract_wrappers generated_docs",
"build:umd:prod": "NODE_ENV=production webpack",
- "build:commonjs": "tsc",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
+ "build:commonjs": "tsc -b",
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"postpublish": {
diff --git a/packages/0x.js/tsconfig.json b/packages/0x.js/tsconfig.json
index e35816553..a96536716 100644
--- a/packages/0x.js/tsconfig.json
+++ b/packages/0x.js/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "src"
},
- "include": ["./src/**/*", "./test/**/*"]
+ "include": ["./src/**/*"]
}
diff --git a/packages/0x.js/typedoc-tsconfig.json b/packages/0x.js/typedoc-tsconfig.json
new file mode 100644
index 000000000..c9b0af1ae
--- /dev/null
+++ b/packages/0x.js/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["./src/**/*", "./test/**/*"]
+}
diff --git a/packages/0x.js/webpack.config.js b/packages/0x.js/webpack.config.js
index 982e076ee..1ad0a79ec 100644
--- a/packages/0x.js/webpack.config.js
+++ b/packages/0x.js/webpack.config.js
@@ -47,8 +47,13 @@ module.exports = {
use: [
{
loader: 'awesome-typescript-loader',
+ // tsconfig.json contains some options required for
+ // project references which do not work with webback.
+ // We override those options here.
query: {
declaration: false,
+ declarationMap: false,
+ composite: false,
},
},
],
diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json
index 000e8cee0..5b4a2b7fc 100644
--- a/packages/abi-gen/package.json
+++ b/packages/abi-gen/package.json
@@ -8,10 +8,9 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
"lint": "tslint --project .",
"clean": "shx rm -rf lib",
- "build": "tsc",
+ "build": "tsc -b",
"test": "yarn run_mocha",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit",
"test:circleci": "yarn test:coverage",
diff --git a/packages/abi-gen/tsconfig.json b/packages/abi-gen/tsconfig.json
index e35816553..2ee711adc 100644
--- a/packages/abi-gen/tsconfig.json
+++ b/packages/abi-gen/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}
diff --git a/packages/assert/package.json b/packages/assert/package.json
index 2dea4b616..29ddb6002 100644
--- a/packages/assert/package.json
+++ b/packages/assert/package.json
@@ -8,8 +8,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"clean": "shx rm -rf lib test_temp",
"lint": "tslint --project .",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit",
diff --git a/packages/assert/tsconfig.json b/packages/assert/tsconfig.json
index e35816553..2ee711adc 100644
--- a/packages/assert/tsconfig.json
+++ b/packages/assert/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}
diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json
index 33a66c97a..08f8766b5 100644
--- a/packages/base-contract/package.json
+++ b/packages/base-contract/package.json
@@ -8,8 +8,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"clean": "shx rm -rf lib",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s clean build test",
diff --git a/packages/base-contract/tsconfig.json b/packages/base-contract/tsconfig.json
index 8b4cd47a2..718e623c7 100644
--- a/packages/base-contract/tsconfig.json
+++ b/packages/base-contract/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["src/**/*", "test/**/*"]
}
diff --git a/packages/connect/package.json b/packages/connect/package.json
index 15f537c7d..543852350 100644
--- a/packages/connect/package.json
+++ b/packages/connect/package.json
@@ -15,8 +15,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"clean": "shx rm -rf lib test_temp generated_docs",
"copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures",
"lint": "tslint --project .",
@@ -26,7 +25,7 @@
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"test:circleci": "yarn test:coverage",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"postpublish": {
diff --git a/packages/connect/tsconfig.json b/packages/connect/tsconfig.json
index e35816553..2ee711adc 100644
--- a/packages/connect/tsconfig.json
+++ b/packages/connect/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}
diff --git a/packages/connect/typedoc-tsconfig.json b/packages/connect/typedoc-tsconfig.json
new file mode 100644
index 000000000..c9b0af1ae
--- /dev/null
+++ b/packages/connect/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["./src/**/*", "./test/**/*"]
+}
diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json
index a49a81d61..7da839a00 100644
--- a/packages/contract-wrappers/package.json
+++ b/packages/contract-wrappers/package.json
@@ -11,8 +11,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "yarn pre_build && tsc -w",
- "build": "yarn pre_build && tsc",
+ "build": "yarn pre_build && tsc -b",
"pre_build": "run-s update_artifacts_v2_beta update_artifacts_v2 generate_contract_wrappers copy_artifacts",
"generate_contract_wrappers": "abi-gen --abis 'src/artifacts/@(Exchange|DummyERC20Token|DummyERC721Token|ZRXToken|ERC20Token|ERC721Token|WETH9|ERC20Proxy|ERC721Proxy|Forwarder|OrderValidator).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers",
"lint": "tslint --project . --exclude **/src/contract_wrappers/**/* --exclude **/lib/**/*",
@@ -26,7 +25,7 @@
"copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts",
"clean": "shx rm -rf _bundles lib test_temp test/artifacts src/contract_wrappers/generated src/artifacts generated_docs",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"contracts_v2_beta": "AssetProxyOwner Exchange ERC20Proxy ERC20Token ERC721Proxy ERC721Token WETH9 ZRXToken Forwarder OrderValidator",
diff --git a/packages/contract-wrappers/tsconfig.json b/packages/contract-wrappers/tsconfig.json
index e35816553..2ee711adc 100644
--- a/packages/contract-wrappers/tsconfig.json
+++ b/packages/contract-wrappers/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}
diff --git a/packages/contract-wrappers/typedoc-tsconfig.json b/packages/contract-wrappers/typedoc-tsconfig.json
new file mode 100644
index 000000000..c9b0af1ae
--- /dev/null
+++ b/packages/contract-wrappers/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["./src/**/*", "./test/**/*"]
+}
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 5d2f290ac..d3351e6cf 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -11,8 +11,7 @@
"test": "test"
},
"scripts": {
- "watch_without_deps": "yarn pre_build && tsc -w",
- "build": "yarn pre_build && tsc",
+ "build": "yarn pre_build && tsc -b",
"pre_build": "run-s compile copy_artifacts generate_contract_wrappers",
"copy_artifacts": "copyfiles -u 4 '../migrations/artifacts/2.0.0/**/*' ./lib/artifacts;",
"test": "yarn run_mocha",
diff --git a/packages/contracts/test/utils/web3_wrapper.ts b/packages/contracts/test/utils/web3_wrapper.ts
index acb3103b7..d1cd3d387 100644
--- a/packages/contracts/test/utils/web3_wrapper.ts
+++ b/packages/contracts/test/utils/web3_wrapper.ts
@@ -1,5 +1,5 @@
import { devConstants, env, EnvVars, web3Factory } from '@0xproject/dev-utils';
-import { prependSubprovider } from '@0xproject/subproviders';
+import { prependSubprovider, Web3ProviderEngine } from '@0xproject/subproviders';
import { logUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
@@ -47,7 +47,7 @@ const ganacheConfigs = {
};
const providerConfigs = testProvider === ProviderType.Ganache ? ganacheConfigs : gethConfigs;
-export const provider = web3Factory.getRpcProvider(providerConfigs);
+export const provider: Web3ProviderEngine = web3Factory.getRpcProvider(providerConfigs);
const isCoverageEnabled = env.parseBoolean(EnvVars.SolidityCoverage);
const isProfilerEnabled = env.parseBoolean(EnvVars.SolidityProfiler);
const isRevertTraceEnabled = env.parseBoolean(EnvVars.SolidityRevertTrace);
diff --git a/packages/contracts/tsconfig.json b/packages/contracts/tsconfig.json
index 86b33ede7..5fd4c5331 100644
--- a/packages/contracts/tsconfig.json
+++ b/packages/contracts/tsconfig.json
@@ -2,13 +2,11 @@
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
- "baseUrl": ".",
- "declaration": false,
- "allowJs": true
+ "rootDir": "."
},
"include": [
"./globals.d.ts",
- "./contract_wrappers",
+ "./generated_contract_wrappers",
"./src/**/*",
"./utils/**/*",
"./test/**/*",
diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json
index d4740d3bd..afe518d10 100644
--- a/packages/dev-utils/package.json
+++ b/packages/dev-utils/package.json
@@ -8,8 +8,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s clean build test",
"test:circleci": "yarn test:coverage",
diff --git a/packages/dev-utils/tsconfig.json b/packages/dev-utils/tsconfig.json
index e35816553..2ee711adc 100644
--- a/packages/dev-utils/tsconfig.json
+++ b/packages/dev-utils/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}
diff --git a/packages/ethereum-types/package.json b/packages/ethereum-types/package.json
index 9e4d287a4..007c4cebe 100644
--- a/packages/ethereum-types/package.json
+++ b/packages/ethereum-types/package.json
@@ -8,11 +8,10 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"clean": "shx rm -rf lib generated_docs",
"lint": "tslint --project .",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"postpublish": {
diff --git a/packages/ethereum-types/tsconfig.json b/packages/ethereum-types/tsconfig.json
index 82a45ea94..9ab22ac8a 100644
--- a/packages/ethereum-types/tsconfig.json
+++ b/packages/ethereum-types/tsconfig.json
@@ -2,7 +2,8 @@
"extends": "../../tsconfig",
"compilerOptions": {
"typeRoots": ["../../node_modules/@types"],
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "src"
},
"include": ["src/**/*"]
}
diff --git a/packages/ethereum-types/typedoc-tsconfig.json b/packages/ethereum-types/typedoc-tsconfig.json
new file mode 100644
index 000000000..f71153ec0
--- /dev/null
+++ b/packages/ethereum-types/typedoc-tsconfig.json
@@ -0,0 +1,8 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "typeRoots": ["../../node_modules/@types"],
+ "outDir": "lib"
+ },
+ "include": ["src/**/*"]
+}
diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json
index d0cb29df4..60192d03e 100644
--- a/packages/fill-scenarios/package.json
+++ b/packages/fill-scenarios/package.json
@@ -5,8 +5,7 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "watch_without_deps": "yarn pre_build && tsc -w",
- "build": "yarn pre_build && tsc",
+ "build": "yarn pre_build && tsc -b",
"pre_build": "run-s update_artifacts generate_contract_wrappers",
"update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-beta-testnet/$i.json lib/artifacts; done;",
"generate_contract_wrappers": "abi-gen --abis 'lib/artifacts/@(Exchange|DummyERC20Token|DummyERC721Token).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
diff --git a/packages/fill-scenarios/tsconfig.json b/packages/fill-scenarios/tsconfig.json
index f5f4b37c2..56689eaa3 100644
--- a/packages/fill-scenarios/tsconfig.json
+++ b/packages/fill-scenarios/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "src"
},
"include": ["src/**/*"]
}
diff --git a/packages/forwarder-helper/package.json b/packages/forwarder-helper/package.json
index fccd7ccdd..ca2fa96d9 100644
--- a/packages/forwarder-helper/package.json
+++ b/packages/forwarder-helper/package.json
@@ -20,7 +20,7 @@
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
"docs:stage": "node scripts/stage_docs.js",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --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": {
@@ -63,7 +63,7 @@
"nyc": "^11.0.1",
"shx": "^0.2.2",
"tslint": "5.11.0",
- "typedoc": "0xProject/typedoc",
+ "typedoc": "0.12.0",
"typescript": "3.0.1"
},
"publishConfig": {
diff --git a/packages/forwarder-helper/tsconfig.json b/packages/forwarder-helper/tsconfig.json
index e35816553..2ee711adc 100644
--- a/packages/forwarder-helper/tsconfig.json
+++ b/packages/forwarder-helper/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}
diff --git a/packages/forwarder-helper/typedoc-tsconfig.json b/packages/forwarder-helper/typedoc-tsconfig.json
new file mode 100644
index 000000000..c9b0af1ae
--- /dev/null
+++ b/packages/forwarder-helper/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["./src/**/*", "./test/**/*"]
+}
diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json
index bdd801a19..b0ea37b6e 100644
--- a/packages/json-schemas/package.json
+++ b/packages/json-schemas/package.json
@@ -8,7 +8,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
+ "build": "tsc -b",
"lint": "tslint --project .",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s clean build test",
@@ -17,8 +17,7 @@
"test:circleci": "yarn test:coverage",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit",
"clean": "shx rm -rf lib test_temp generated_docs",
- "build": "tsc",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"postpublish": {
diff --git a/packages/json-schemas/tsconfig.json b/packages/json-schemas/tsconfig.json
index e35816553..96bf8789e 100644
--- a/packages/json-schemas/tsconfig.json
+++ b/packages/json-schemas/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
- "include": ["./src/**/*", "./test/**/*"]
+ "include": ["./src/**/*", "./test/**/*", "./schemas/**/*"]
}
diff --git a/packages/json-schemas/typedoc-tsconfig.json b/packages/json-schemas/typedoc-tsconfig.json
new file mode 100644
index 000000000..c9b0af1ae
--- /dev/null
+++ b/packages/json-schemas/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["./src/**/*", "./test/**/*"]
+}
diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json
index ea251e2fe..4b467716d 100644
--- a/packages/metacoin/package.json
+++ b/packages/metacoin/package.json
@@ -8,8 +8,7 @@
"description": "Example solidity project using 0x dev tools",
"scripts": {
"lint": "tslint --project . --exclude **/src/contract_wrappers/**/*",
- "watch_without_deps": "yarn pre_build && tsc -w",
- "build": "yarn pre_build && tsc",
+ "build": "yarn pre_build && tsc -b",
"pre_build": "run-s compile generate_contract_wrappers copy_artifacts",
"clean": "shx rm -rf lib artifacts src/contract_wrappers",
"copy_artifacts": "copyfiles './artifacts/**/*' './contracts/**/*' ./lib",
diff --git a/packages/metacoin/tsconfig.json b/packages/metacoin/tsconfig.json
index bc3bd1e94..3065396ff 100644
--- a/packages/metacoin/tsconfig.json
+++ b/packages/metacoin/tsconfig.json
@@ -1,8 +1,8 @@
{
+ "extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
- "lib": ["es2017"],
- "skipLibCheck": true,
+ "rootDir": ".",
"typeRoots": [
"comment: for building within 0x-monorepo:",
"../../node_modules/@0xproject/typescript-typings/types",
diff --git a/packages/migrations/package.json b/packages/migrations/package.json
index 89cd4207a..bd8451328 100644
--- a/packages/migrations/package.json
+++ b/packages/migrations/package.json
@@ -8,8 +8,7 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "watch_without_deps": "yarn pre_build && tsc -w",
- "build": "yarn pre_build && tsc",
+ "build": "yarn pre_build && tsc -b",
"pre_build": "run-s compile:v2 copy_artifacts generate_contract_wrappers",
"copy_artifacts": "copyfiles 'artifacts/**/*' ./lib",
"clean": "shx rm -rf lib src/1.0.0/contract_wrappers src/2.0.0/contract_wrappers src/2.0.0-beta-testnet/contract_wrappers artifacts/2.0.0",
diff --git a/packages/migrations/tsconfig.json b/packages/migrations/tsconfig.json
index f5f4b37c2..56689eaa3 100644
--- a/packages/migrations/tsconfig.json
+++ b/packages/migrations/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "src"
},
"include": ["src/**/*"]
}
diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json
index a2f2343b8..f1d0ff29c 100644
--- a/packages/monorepo-scripts/package.json
+++ b/packages/monorepo-scripts/package.json
@@ -9,8 +9,7 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"lint": "tslint --project .",
"clean": "shx rm -rf lib",
"test:publish": "run-s build script:publish",
diff --git a/packages/monorepo-scripts/tsconfig.json b/packages/monorepo-scripts/tsconfig.json
index 332d3a5e1..c8b1d23e5 100644
--- a/packages/monorepo-scripts/tsconfig.json
+++ b/packages/monorepo-scripts/tsconfig.json
@@ -2,7 +2,8 @@
"extends": "../../tsconfig",
"compilerOptions": {
"typeRoots": ["../../node_modules/@types", "node_modules/@types"],
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "src"
},
"include": ["./src/**/*"]
}
diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json
index 77a4142fc..7d2caa0e8 100644
--- a/packages/order-utils/package.json
+++ b/packages/order-utils/package.json
@@ -8,10 +8,8 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "yarn pre_build && tsc -w",
- "build": "run-s pre_build transpile",
+ "build": "yarn pre_build && tsc -b",
"pre_build": "run-s update_artifacts_v2_beta generate_contract_wrappers",
- "transpile": "tsc",
"generate_contract_wrappers": "abi-gen --abis 'lib/src/artifacts/@(Exchange|IWallet|IValidator|DummyERC20Token|ERC20Proxy|ERC20Token).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
"update_artifacts_v2_beta": "for i in ${npm_package_config_contracts_v2_beta}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-beta-testnet/$i.json lib/src/artifacts; done;",
"test": "yarn run_mocha",
@@ -22,7 +20,7 @@
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"clean": "shx rm -rf lib lib/src/artifacts src/generated_contract_wrappers generated_docs",
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"contracts_v2_beta": "IWallet IValidator Exchange ERC20Proxy ERC20Token DummyERC20Token",
diff --git a/packages/order-utils/tsconfig.json b/packages/order-utils/tsconfig.json
index 8b4cd47a2..718e623c7 100644
--- a/packages/order-utils/tsconfig.json
+++ b/packages/order-utils/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["src/**/*", "test/**/*"]
}
diff --git a/packages/order-utils/typedoc-tsconfig.json b/packages/order-utils/typedoc-tsconfig.json
new file mode 100644
index 000000000..b9c6b36f3
--- /dev/null
+++ b/packages/order-utils/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["src/**/*", "test/**/*"]
+}
diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json
index 0d5bfd48c..27eeca6fd 100644
--- a/packages/order-watcher/package.json
+++ b/packages/order-watcher/package.json
@@ -12,8 +12,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "yarn pre_build && tsc -w",
- "build": "yarn pre_build && tsc",
+ "build": "yarn pre_build && tsc -b",
"pre_build": "run-s update_artifacts copy_artifacts generate_contract_wrappers",
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
"generate_contract_wrappers": "abi-gen --abis 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
@@ -26,7 +25,7 @@
"update_artifacts": "for i in ${npm_package_config_contracts_v2_beta}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-beta-testnet/$i.json src/artifacts; done;",
"clean": "shx rm -rf _bundles lib test_temp test/artifacts src/generated_contract_wrappers generated_docs",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"contracts_v2_beta": "AssetProxyOwner ERC20Proxy ERC20Token ERC721Proxy ERC721Token Exchange Forwarder OrderValidator WETH9 ZRXToken",
diff --git a/packages/order-watcher/tsconfig.json b/packages/order-watcher/tsconfig.json
index e35816553..2ee711adc 100644
--- a/packages/order-watcher/tsconfig.json
+++ b/packages/order-watcher/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}
diff --git a/packages/order-watcher/typedoc-tsconfig.json b/packages/order-watcher/typedoc-tsconfig.json
new file mode 100644
index 000000000..c9b0af1ae
--- /dev/null
+++ b/packages/order-watcher/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["./src/**/*", "./test/**/*"]
+}
diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json
index 9e95e69d0..edd55a9b5 100644
--- a/packages/react-docs/package.json
+++ b/packages/react-docs/package.json
@@ -9,8 +9,7 @@
"types": "lib/index.d.ts",
"scripts": {
"lint": "tslint --project .",
- "build": "tsc",
- "watch_without_deps": "tsc -w",
+ "build": "tsc -b",
"clean": "shx rm -rf lib"
},
"author": "Fabio Berger",
diff --git a/packages/react-docs/tsconfig.json b/packages/react-docs/tsconfig.json
index 82f44a62c..76e2cd027 100644
--- a/packages/react-docs/tsconfig.json
+++ b/packages/react-docs/tsconfig.json
@@ -1,9 +1,10 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "./lib/",
+ "outDir": "lib",
+ "rootDir": "src",
"jsx": "react",
- "baseUrl": "./",
+ "baseUrl": ".",
"strictNullChecks": false,
"paths": {
"*": ["node_modules/@types/*", "*"]
diff --git a/packages/react-shared/tsconfig.json b/packages/react-shared/tsconfig.json
index 687bd1f4e..5abe0ab4e 100644
--- a/packages/react-shared/tsconfig.json
+++ b/packages/react-shared/tsconfig.json
@@ -1,9 +1,10 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "./lib/",
+ "outDir": "lib",
+ "rootDir": "src",
"jsx": "react",
- "baseUrl": "./",
+ "baseUrl": ".",
"paths": {
"*": ["node_modules/@types/*", "*"]
}
diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json
index f60edc1f9..eab96fcce 100644
--- a/packages/sol-compiler/package.json
+++ b/packages/sol-compiler/package.json
@@ -8,8 +8,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "yarn pre_build && tsc -w",
- "build": "yarn pre_build && tsc",
+ "build": "yarn pre_build && tsc -b",
"pre_build": "run-s update_contract_fixtures",
"update_contract_fixtures": "copyfiles 'test/fixtures/contracts/**/*' ./lib",
"test": "yarn run_mocha",
@@ -21,7 +20,7 @@
"migrate": "npm run build; node lib/src/cli.js migrate",
"lint": "tslint --project .",
"test:circleci": "yarn test:coverage",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"postpublish": {
diff --git a/packages/sol-compiler/tsconfig.json b/packages/sol-compiler/tsconfig.json
index 63cbc75c3..c6ffbb99b 100644
--- a/packages/sol-compiler/tsconfig.json
+++ b/packages/sol-compiler/tsconfig.json
@@ -2,6 +2,7 @@
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
+ "rootDir": ".",
"strictFunctionTypes": false
},
"include": ["./src/**/*", "./test/**/*"]
diff --git a/packages/sol-compiler/typedoc-tsconfig.json b/packages/sol-compiler/typedoc-tsconfig.json
new file mode 100644
index 000000000..22897c131
--- /dev/null
+++ b/packages/sol-compiler/typedoc-tsconfig.json
@@ -0,0 +1,8 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib",
+ "strictFunctionTypes": false
+ },
+ "include": ["./src/**/*", "./test/**/*"]
+}
diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json
index b8c008b3e..3772d02c5 100644
--- a/packages/sol-cov/package.json
+++ b/packages/sol-cov/package.json
@@ -8,8 +8,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "yarn pre_build && tsc -w",
- "build": "yarn pre_build && tsc",
+ "build": "yarn pre_build && tsc -b",
"pre_build": "run-s copy_test_fixtures",
"lint": "tslint --project .",
"test": "run-s compile_test run_mocha",
@@ -21,7 +20,7 @@
"clean": "shx rm -rf lib test/fixtures/artifacts src/artifacts generated_docs",
"copy_test_fixtures": "copyfiles 'test/fixtures/**/*' ./lib",
"compile_test": "sol-compiler compile",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"postpublish": {
diff --git a/packages/sol-cov/tsconfig.json b/packages/sol-cov/tsconfig.json
index e35816553..2ee711adc 100644
--- a/packages/sol-cov/tsconfig.json
+++ b/packages/sol-cov/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}
diff --git a/packages/sol-cov/typedoc-tsconfig.json b/packages/sol-cov/typedoc-tsconfig.json
new file mode 100644
index 000000000..c9b0af1ae
--- /dev/null
+++ b/packages/sol-cov/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["./src/**/*", "./test/**/*"]
+}
diff --git a/packages/sol-resolver/package.json b/packages/sol-resolver/package.json
index f3772a118..7a773ce7c 100644
--- a/packages/sol-resolver/package.json
+++ b/packages/sol-resolver/package.json
@@ -8,8 +8,7 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"clean": "shx rm -rf lib",
"lint": "tslint --project ."
},
diff --git a/packages/sol-resolver/tsconfig.json b/packages/sol-resolver/tsconfig.json
index f5f4b37c2..56689eaa3 100644
--- a/packages/sol-resolver/tsconfig.json
+++ b/packages/sol-resolver/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "src"
},
"include": ["src/**/*"]
}
diff --git a/packages/sra-report/package.json b/packages/sra-report/package.json
index 91b97dd98..481794d5d 100644
--- a/packages/sra-report/package.json
+++ b/packages/sra-report/package.json
@@ -8,9 +8,8 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
"clean": "shx rm -rf lib",
- "build": "tsc",
+ "build": "tsc -b",
"lint": "tslint --project .",
"test:circleci": "yarn test:coverage",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
diff --git a/packages/sra-report/tsconfig.json b/packages/sra-report/tsconfig.json
index e35816553..2ee711adc 100644
--- a/packages/sra-report/tsconfig.json
+++ b/packages/sra-report/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}
diff --git a/packages/sra-spec/package.json b/packages/sra-spec/package.json
index b560fa77b..f11b1bb5a 100644
--- a/packages/sra-spec/package.json
+++ b/packages/sra-spec/package.json
@@ -5,8 +5,8 @@
"node": ">=6.12"
},
"description": "Standard Relayer API Open API Spec",
- "main": "lib/index.js",
- "types": "lib/index.d.ts",
+ "main": "lib/src/index.js",
+ "types": "lib/src/index.d.ts",
"scripts": {
"serve": "redoc-cli serve lib/api.json --watch",
"watch_without_deps": "run-p build-json:watch serve",
@@ -17,10 +17,10 @@
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"test:circleci": "yarn test:coverage",
"clean": "shx rm -rf lib",
- "build": "tsc && yarn copy_md_files && yarn build-json",
- "build-json": "ts-node build_scripts/buildJson.ts",
+ "build": "tsc -b && yarn copy_md_files && yarn build-json",
+ "build-json": "node ./lib/build_scripts/buildJson",
"build-json:watch": "chokidar 'src/**/*' -c 'yarn build-json' ",
- "copy_md_files": "copyfiles -u 2 './src/md/**/*.md' ./lib/md",
+ "copy_md_files": "copyfiles -u 2 './src/md/**/*.md' ./lib/src/md",
"deploy-site": "discharge deploy"
},
"repository": {
@@ -54,7 +54,7 @@
"swagger-cli": "^2.1.1",
"ts-node": "^7.0.0",
"tslint": "5.11.0",
- "typescript": "2.7.1"
+ "typescript": "3.0.1"
},
"publishConfig": {
"access": "public"
diff --git a/packages/sra-spec/tsconfig.json b/packages/sra-spec/tsconfig.json
index e60028885..785ed914d 100644
--- a/packages/sra-spec/tsconfig.json
+++ b/packages/sra-spec/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
- "include": ["./src/**/*", "./test/*"]
+ "include": ["./src/**/*", "./test/*", "./build_scripts/*", "./md/*"]
}
diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json
index 48c6d5ae9..d9583b357 100644
--- a/packages/subproviders/package.json
+++ b/packages/subproviders/package.json
@@ -8,8 +8,7 @@
"types": "lib/src/index.d.ts",
"license": "Apache-2.0",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"clean": "shx rm -rf lib generated_docs",
"lint": "tslint --project .",
"run_mocha_unit": "mocha --require source-map-support/register --require make-promises-safe lib/test/unit/**/*_test.js --timeout 10000 --bail --exit",
@@ -21,7 +20,7 @@
"test:all": "run-s test:unit test:integration",
"test:unit": "run-s clean build run_mocha_unit",
"test:integration": "run-s clean build run_mocha_integration",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"postpublish": {
diff --git a/packages/subproviders/tsconfig.json b/packages/subproviders/tsconfig.json
index e35816553..2ee711adc 100644
--- a/packages/subproviders/tsconfig.json
+++ b/packages/subproviders/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}
diff --git a/packages/subproviders/typedoc-tsconfig.json b/packages/subproviders/typedoc-tsconfig.json
new file mode 100644
index 000000000..c9b0af1ae
--- /dev/null
+++ b/packages/subproviders/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["./src/**/*", "./test/**/*"]
+}
diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json
index 9c32dde47..2e5e1f30a 100644
--- a/packages/testnet-faucets/package.json
+++ b/packages/testnet-faucets/package.json
@@ -8,7 +8,6 @@
"description": "A faucet micro-service that dispenses test ERC20 tokens or Ether",
"main": "server.js",
"scripts": {
- "watch_without_deps": "tsc -w",
"build": "node ../../node_modules/gulp/bin/gulp.js build",
"dev": "node ../../node_modules/gulp/bin/gulp.js run",
"start": "node ./server/server.js",
diff --git a/packages/testnet-faucets/tsconfig.json b/packages/testnet-faucets/tsconfig.json
index d7e89a1e2..4997ce208 100644
--- a/packages/testnet-faucets/tsconfig.json
+++ b/packages/testnet-faucets/tsconfig.json
@@ -2,6 +2,7 @@
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
+ "rootDir": "src/ts",
"strictPropertyInitialization": false
},
"include": ["./src/ts/**/*"]
diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json
index 330314974..0907b43b6 100644
--- a/packages/tslint-config/package.json
+++ b/packages/tslint-config/package.json
@@ -7,8 +7,7 @@
"description": "Lint rules related to 0xProject for TSLint",
"main": "tslint.json",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"clean": "shx rm -rf lib",
"lint": "tslint --project ."
},
diff --git a/packages/tslint-config/tsconfig.json b/packages/tslint-config/tsconfig.json
index 1935fedc6..44845cf1f 100644
--- a/packages/tslint-config/tsconfig.json
+++ b/packages/tslint-config/tsconfig.json
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "typeRoots": ["../../node_modules/@types", "node_modules/@types"],
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "rules"
},
"include": ["./rules/**/*"]
}
diff --git a/packages/types/package.json b/packages/types/package.json
index 291452cbb..362c8f639 100644
--- a/packages/types/package.json
+++ b/packages/types/package.json
@@ -8,8 +8,7 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"clean": "shx rm -rf lib",
"lint": "tslint --project ."
},
diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json
index ce916a635..56689eaa3 100644
--- a/packages/types/tsconfig.json
+++ b/packages/types/tsconfig.json
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "typeRoots": ["../../node_modules/@types", "node_modules/@types"],
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "src"
},
"include": ["src/**/*"]
}
diff --git a/packages/typescript-typings/package.json b/packages/typescript-typings/package.json
index c047a5328..08cf708a6 100644
--- a/packages/typescript-typings/package.json
+++ b/packages/typescript-typings/package.json
@@ -6,8 +6,7 @@
},
"description": "0x project typescript type definitions",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"clean": "shx rm -rf lib"
},
"repository": {
@@ -32,6 +31,7 @@
},
"devDependencies": {
"copyfiles": "^2.0.0",
+ "typescript": "3.0.1",
"shx": "^0.2.2"
},
"publishConfig": {
diff --git a/packages/typescript-typings/tsconfig.json b/packages/typescript-typings/tsconfig.json
index a9a644b17..7f0fe2f7a 100644
--- a/packages/typescript-typings/tsconfig.json
+++ b/packages/typescript-typings/tsconfig.json
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
}
}
diff --git a/packages/utils/package.json b/packages/utils/package.json
index c72fb4c83..d93163e81 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -8,8 +8,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"clean": "shx rm -rf lib",
"lint": "tslint --project .",
"test": "yarn run_mocha",
diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json
index 8b4cd47a2..718e623c7 100644
--- a/packages/utils/tsconfig.json
+++ b/packages/utils/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["src/**/*", "test/**/*"]
}
diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json
index f84074447..6361fbde7 100644
--- a/packages/web3-wrapper/package.json
+++ b/packages/web3-wrapper/package.json
@@ -8,8 +8,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"clean": "shx rm -rf lib generated_docs",
"lint": "tslint --project .",
"test": "yarn run_mocha",
@@ -18,7 +17,7 @@
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"postpublish": {
diff --git a/packages/web3-wrapper/tsconfig.json b/packages/web3-wrapper/tsconfig.json
index 8b4cd47a2..718e623c7 100644
--- a/packages/web3-wrapper/tsconfig.json
+++ b/packages/web3-wrapper/tsconfig.json
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "."
},
"include": ["src/**/*", "test/**/*"]
}
diff --git a/packages/web3-wrapper/typedoc-tsconfig.json b/packages/web3-wrapper/typedoc-tsconfig.json
new file mode 100644
index 000000000..b9c6b36f3
--- /dev/null
+++ b/packages/web3-wrapper/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["src/**/*", "test/**/*"]
+}
diff --git a/packages/website/tsconfig.json b/packages/website/tsconfig.json
index 34171b51e..6421cd459 100644
--- a/packages/website/tsconfig.json
+++ b/packages/website/tsconfig.json
@@ -8,7 +8,12 @@
"allowJs": true,
"strictNullChecks": false,
"noImplicitThis": false,
+ // tsconfig.json at the monorepo root contains some options required for
+ // project references which do not work for website. We override those
+ // options here.
"declaration": false,
+ "declarationMap": false,
+ "composite": false,
"paths": {
"*": ["node_modules/@types/*", "*"]
}
diff --git a/tsconfig.json b/tsconfig.json
index 588285140..a931b28b9 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -3,14 +3,56 @@
"module": "commonjs",
"target": "es5",
"lib": ["es2017", "dom"],
- "sourceMap": true,
- "declaration": true,
"experimentalDecorators": true,
"downlevelIteration": true,
"noImplicitReturns": true,
"pretty": true,
"skipLibCheck": true,
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
- "strict": true
- }
+ "strict": true,
+ // These settings are required for TypeScript project references
+ "composite": true,
+ "declaration": true,
+ "declarationMap": true,
+ "sourceMap": true
+ },
+ // The root of the project is just a list of references and does not contain
+ // any top-level TypeScript code.
+ "include": [],
+ "references": [
+ { "path": "./packages/0x.js" },
+ { "path": "./packages/abi-gen" },
+ { "path": "./packages/assert" },
+ { "path": "./packages/base-contract" },
+ { "path": "./packages/connect" },
+ { "path": "./packages/contract-wrappers" },
+ { "path": "./packages/contracts" },
+ { "path": "./packages/dev-utils" },
+ { "path": "./packages/ethereum-types" },
+ { "path": "./packages/fill-scenarios" },
+ { "path": "./packages/forwarder-helper" },
+ { "path": "./packages/json-schemas" },
+ { "path": "./packages/metacoin" },
+ { "path": "./packages/migrations" },
+ { "path": "./packages/monorepo-scripts" },
+ { "path": "./packages/order-utils" },
+ { "path": "./packages/order-watcher" },
+ { "path": "./packages/react-docs" },
+ { "path": "./packages/react-shared" },
+ { "path": "./packages/sol-compiler" },
+ { "path": "./packages/sol-cov" },
+ { "path": "./packages/sol-resolver" },
+ { "path": "./packages/sra-report" },
+ { "path": "./packages/sra-spec" },
+ { "path": "./packages/subproviders" },
+ { "path": "./packages/testnet-faucets" },
+ { "path": "./packages/tslint-config" },
+ { "path": "./packages/types" },
+ { "path": "./packages/typescript-typings" },
+ { "path": "./packages/utils" },
+ { "path": "./packages/web3-wrapper" }
+ // Skipping website because it requires allowJs: false and this is
+ // incompatible with project references.
+ // { "path": "./packages/website" }
+ ]
}
diff --git a/typedoc-tsconfig.json b/typedoc-tsconfig.json
new file mode 100644
index 000000000..588285140
--- /dev/null
+++ b/typedoc-tsconfig.json
@@ -0,0 +1,16 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es5",
+ "lib": ["es2017", "dom"],
+ "sourceMap": true,
+ "declaration": true,
+ "experimentalDecorators": true,
+ "downlevelIteration": true,
+ "noImplicitReturns": true,
+ "pretty": true,
+ "skipLibCheck": true,
+ "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
+ "strict": true
+ }
+}
diff --git a/yarn.lock b/yarn.lock
index bc67345ca..4f5eb3589 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -966,12 +966,6 @@
version "2.0.0"
resolved "https://registry.yarnpkg.com/@types/find-versions/-/find-versions-2.0.0.tgz#a976ca032ab8dd1161116604eded0620d2b85df2"
-"@types/fs-extra@5.0.0":
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.0.tgz#d3e225b35eb5c6d3a5a782c28219df365c781413"
- dependencies:
- "@types/node" "*"
-
"@types/fs-extra@^5.0.3":
version "5.0.4"
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.4.tgz#b971134d162cc0497d221adde3dbb67502225599"
@@ -986,10 +980,6 @@
"@types/minimatch" "*"
"@types/node" "*"
-"@types/handlebars@4.0.36":
- version "4.0.36"
- resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.36.tgz#ff57c77fa1ab6713bb446534ddc4d979707a3a79"
-
"@types/handlebars@^4.0.36":
version "4.0.37"
resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.37.tgz#a3bc3eba0c0f03f753cac00841a5b21e26a02c03"
@@ -1004,10 +994,6 @@
dependencies:
"@types/node" "*"
-"@types/highlight.js@9.12.2":
- version "9.12.2"
- resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.2.tgz#6ee7cd395effe5ec80b515d3ff1699068cd0cd1d"
-
"@types/highlight.js@^9.12.3":
version "9.12.3"
resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.3.tgz#b672cfaac25cbbc634a0fd92c515f66faa18dbca"
@@ -1054,10 +1040,6 @@
version "4.14.104"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80"
-"@types/lodash@4.14.99":
- version "4.14.99"
- resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.99.tgz#e6e10c0a4cc16c7409b3181f1e66880d2fb7d4dc"
-
"@types/lodash@^4.14.110", "@types/lodash@^4.14.116":
version "4.14.116"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.116.tgz#5ccf215653e3e8c786a58390751033a9adca0eb9"
@@ -1066,10 +1048,6 @@
version "1.5.3"
resolved "https://registry.yarnpkg.com/@types/loglevel/-/loglevel-1.5.3.tgz#adfce55383edc5998a2170ad581b3e23d6adb5b8"
-"@types/marked@0.3.0":
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.3.0.tgz#583c223dd33385a1dda01aaf77b0cd0411c4b524"
-
"@types/marked@^0.4.0":
version "0.4.0"
resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.4.0.tgz#057a6165703e7419217f8ffc6887747f980b6315"
@@ -1250,13 +1228,6 @@
"@types/express-serve-static-core" "*"
"@types/mime" "*"
-"@types/shelljs@0.7.7":
- version "0.7.7"
- resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.7.tgz#1f7bfa28947661afea06365db9b1135bbc903ec4"
- dependencies:
- "@types/glob" "*"
- "@types/node" "*"
-
"@types/shelljs@^0.8.0":
version "0.8.0"
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.0.tgz#0caa56b68baae4f68f44e0dd666ab30b098e3632"
@@ -8751,10 +8722,6 @@ marked@0.3.18:
version "0.3.18"
resolved "https://registry.npmjs.org/marked/-/marked-0.3.18.tgz#3ef058cd926101849b92a7a7c15db18c7fc76b2f"
-marked@^0.3.12:
- version "0.3.19"
- resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790"
-
marked@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.4.0.tgz#9ad2c2a7a1791f10a852e0112f77b571dce10c66"
@@ -12517,7 +12484,7 @@ shelljs@^0.7.3:
interpret "^1.0.0"
rechoir "^0.6.2"
-shelljs@^0.8.0, shelljs@^0.8.1, shelljs@^0.8.2:
+shelljs@^0.8.0, shelljs@^0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35"
dependencies:
@@ -13900,38 +13867,12 @@ typedoc@0.12.0:
typedoc-default-themes "^0.5.0"
typescript "3.0.x"
-typedoc@0xProject/typedoc:
- version "0.10.0"
- resolved "https://codeload.github.com/0xProject/typedoc/tar.gz/a9970a52f0924fec2df608abe30ff81153b3def2"
- dependencies:
- "@types/fs-extra" "5.0.0"
- "@types/handlebars" "4.0.36"
- "@types/highlight.js" "9.12.2"
- "@types/lodash" "4.14.99"
- "@types/marked" "0.3.0"
- "@types/minimatch" "3.0.3"
- "@types/shelljs" "0.7.7"
- fs-extra "^5.0.0"
- handlebars "^4.0.6"
- highlight.js "^9.0.0"
- lodash "^4.13.1"
- marked "^0.3.12"
- minimatch "^3.0.0"
- progress "^2.0.0"
- shelljs "^0.8.1"
- typedoc-default-themes "^0.5.0"
- typescript "2.7.1"
-
types-bn@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/types-bn/-/types-bn-0.0.1.tgz#4253c7c7251b14e1d77cdca6f58800e5e2b82c4b"
dependencies:
bn.js "4.11.7"
-typescript@2.7.1:
- version "2.7.1"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.1.tgz#bb3682c2c791ac90e7c6210b26478a8da085c359"
-
typescript@3.0.1, typescript@3.0.x:
version "3.0.1"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.1.tgz#43738f29585d3a87575520a4b93ab6026ef11fdb"