aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
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 /packages/contracts
parentf44644ad9029148c43f69d666356ed9fb18de4e2 (diff)
downloaddexon-sol-tools-e7d5ceb9c5487a5851dbfc1f8bdbe0182fedaef2.tar.gz
dexon-sol-tools-e7d5ceb9c5487a5851dbfc1f8bdbe0182fedaef2.tar.zst
dexon-sol-tools-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
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/package.json3
-rw-r--r--packages/contracts/test/utils/web3_wrapper.ts4
-rw-r--r--packages/contracts/tsconfig.json6
3 files changed, 5 insertions, 8 deletions
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/**/*",