diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-11-22 21:16:08 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-11-22 21:48:15 +0800 |
commit | 06cc66005cf0713fcc877ae67b51b38fb110b09d (patch) | |
tree | 9823f26c8f83f5051aa2b5a6068fe9c542eaeb4c /packages | |
parent | a5359df002d121c1b7c1f29e8a2bd8b351090ee3 (diff) | |
download | dexon-0x-contracts-06cc66005cf0713fcc877ae67b51b38fb110b09d.tar dexon-0x-contracts-06cc66005cf0713fcc877ae67b51b38fb110b09d.tar.gz dexon-0x-contracts-06cc66005cf0713fcc877ae67b51b38fb110b09d.tar.bz2 dexon-0x-contracts-06cc66005cf0713fcc877ae67b51b38fb110b09d.tar.lz dexon-0x-contracts-06cc66005cf0713fcc877ae67b51b38fb110b09d.tar.xz dexon-0x-contracts-06cc66005cf0713fcc877ae67b51b38fb110b09d.tar.zst dexon-0x-contracts-06cc66005cf0713fcc877ae67b51b38fb110b09d.zip |
Make contract-templates an npm package
Diffstat (limited to 'packages')
-rw-r--r-- | packages/0x.js/package.json | 1 | ||||
-rw-r--r-- | packages/abi-gen-wrappers/package.json | 3 | ||||
-rw-r--r-- | packages/contract-templates/CHANGELOG.json | 11 | ||||
-rw-r--r-- | packages/contract-templates/README.md (renamed from packages/contract_templates/README.md) | 0 | ||||
-rw-r--r-- | packages/contract-templates/contract.handlebars (renamed from packages/contract_templates/contract.handlebars) | 0 | ||||
-rw-r--r-- | packages/contract-templates/package.json | 20 | ||||
-rw-r--r-- | packages/contract-templates/partials/call.handlebars (renamed from packages/contract_templates/partials/call.handlebars) | 0 | ||||
-rw-r--r-- | packages/contract-templates/partials/callAsync.handlebars (renamed from packages/contract_templates/partials/callAsync.handlebars) | 0 | ||||
-rw-r--r-- | packages/contract-templates/partials/event.handlebars (renamed from packages/contract_templates/partials/event.handlebars) | 0 | ||||
-rw-r--r-- | packages/contract-templates/partials/params.handlebars (renamed from packages/contract_templates/partials/params.handlebars) | 0 | ||||
-rw-r--r-- | packages/contract-templates/partials/return_type.handlebars (renamed from packages/contract_templates/partials/return_type.handlebars) | 0 | ||||
-rw-r--r-- | packages/contract-templates/partials/tx.handlebars (renamed from packages/contract_templates/partials/tx.handlebars) | 0 | ||||
-rw-r--r-- | packages/contract-templates/partials/typed_params.handlebars (renamed from packages/contract_templates/partials/typed_params.handlebars) | 0 | ||||
-rw-r--r-- | packages/contracts/package.json | 2 | ||||
-rw-r--r-- | packages/metacoin/package.json | 3 |
15 files changed, 36 insertions, 4 deletions
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index bc7ee2c87..3850e9038 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -42,7 +42,6 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0x/abi-gen": "^1.0.17", "@0x/abi-gen-wrappers": "^1.1.0", "@0x/contract-addresses": "^1.2.0", "@0x/dev-utils": "^1.0.18", diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index 0977ca03a..df1c484ec 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -15,7 +15,7 @@ "lint": "tslint --format stylish --project .", "pre_build": "yarn generate_contract_wrappers", "clean": "shx rm -rf lib wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers" + "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/contract-templates/contract.handlebars --partials '../../node_modules/@0x/contract-templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers" }, "config": { "abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IValidator|IWallet|OrderValidator|WETH9|ZRXToken).json" @@ -31,6 +31,7 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md", "devDependencies": { "@0x/abi-gen": "^1.0.17", + "@0x/contract-templates": "^1.0.0", "@0x/tslint-config": "^1.0.10", "@0x/types": "^1.3.0", "@0x/utils": "^2.0.6", diff --git a/packages/contract-templates/CHANGELOG.json b/packages/contract-templates/CHANGELOG.json new file mode 100644 index 000000000..adf615b3b --- /dev/null +++ b/packages/contract-templates/CHANGELOG.json @@ -0,0 +1,11 @@ +[ + { + "version": "1.0.0", + "changes": [ + { + "note": "Initial publish", + "pr": 1305 + } + ] + } +] diff --git a/packages/contract_templates/README.md b/packages/contract-templates/README.md index c6cc3b1b3..c6cc3b1b3 100644 --- a/packages/contract_templates/README.md +++ b/packages/contract-templates/README.md diff --git a/packages/contract_templates/contract.handlebars b/packages/contract-templates/contract.handlebars index 9b2a2b336..9b2a2b336 100644 --- a/packages/contract_templates/contract.handlebars +++ b/packages/contract-templates/contract.handlebars diff --git a/packages/contract-templates/package.json b/packages/contract-templates/package.json new file mode 100644 index 000000000..f79ae8931 --- /dev/null +++ b/packages/contract-templates/package.json @@ -0,0 +1,20 @@ +{ + "name": "@0x/contract-templates", + "version": "1.0.0", + "engines": { + "node": ">=6.12" + }, + "description": "Handlebars templates used by abi-gen to generate contract-wrappers", + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x-monorepo.git" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x-monorepo/issues" + }, + "homepage": "https://github.com/0xProject/0x-monorepo/packages/contract-templates/README.md", + "publishConfig": { + "access": "public" + } +} diff --git a/packages/contract_templates/partials/call.handlebars b/packages/contract-templates/partials/call.handlebars index 7c9c934c3..7c9c934c3 100644 --- a/packages/contract_templates/partials/call.handlebars +++ b/packages/contract-templates/partials/call.handlebars diff --git a/packages/contract_templates/partials/callAsync.handlebars b/packages/contract-templates/partials/callAsync.handlebars index ddbbe7508..ddbbe7508 100644 --- a/packages/contract_templates/partials/callAsync.handlebars +++ b/packages/contract-templates/partials/callAsync.handlebars diff --git a/packages/contract_templates/partials/event.handlebars b/packages/contract-templates/partials/event.handlebars index 61d523ca2..61d523ca2 100644 --- a/packages/contract_templates/partials/event.handlebars +++ b/packages/contract-templates/partials/event.handlebars diff --git a/packages/contract_templates/partials/params.handlebars b/packages/contract-templates/partials/params.handlebars index 2d9bb8ed9..2d9bb8ed9 100644 --- a/packages/contract_templates/partials/params.handlebars +++ b/packages/contract-templates/partials/params.handlebars diff --git a/packages/contract_templates/partials/return_type.handlebars b/packages/contract-templates/partials/return_type.handlebars index 77d96e8c4..77d96e8c4 100644 --- a/packages/contract_templates/partials/return_type.handlebars +++ b/packages/contract-templates/partials/return_type.handlebars diff --git a/packages/contract_templates/partials/tx.handlebars b/packages/contract-templates/partials/tx.handlebars index b39156583..b39156583 100644 --- a/packages/contract_templates/partials/tx.handlebars +++ b/packages/contract-templates/partials/tx.handlebars diff --git a/packages/contract_templates/partials/typed_params.handlebars b/packages/contract-templates/partials/typed_params.handlebars index c100e58f7..c100e58f7 100644 --- a/packages/contract_templates/partials/typed_params.handlebars +++ b/packages/contract-templates/partials/typed_params.handlebars diff --git a/packages/contracts/package.json b/packages/contracts/package.json index e10678d83..4fb0838f4 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -22,7 +22,7 @@ "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit", "compile": "sol-compiler --contracts-dir contracts", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/contract-templates/contract.handlebars --partials '../../node_modules/@0x/contract-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index c5679a1d6..8081c03c9 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -18,7 +18,7 @@ "test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov", "test:profile": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --bail --exit --timeout 10000", - "generate_contract_wrappers": "abi-gen --abis 'artifacts/Metacoin.json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --abis 'artifacts/Metacoin.json' --template ../../node_modules/@0x/contract-templates/contract.handlebars --partials '../../node_modules/@0x/contract-templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", "profiler:report:html": "istanbul report html && open coverage/index.html", @@ -30,6 +30,7 @@ "license": "Apache-2.0", "dependencies": { "@0x/abi-gen": "^1.0.17", + "@0x/contract-templates": "^1.0.0", "@0x/base-contract": "^3.0.7", "@0x/sol-cov": "^2.1.13", "@0x/subproviders": "^2.1.5", |