aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/abi-gen/package.json4
-rw-r--r--packages/abi-gen/scripts/postpublish.js5
-rw-r--r--packages/abi-gen/src/globals.d.ts7
-rw-r--r--packages/abi-gen/src/monorepo_scripts/postpublish.ts6
4 files changed, 16 insertions, 6 deletions
diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json
index 1045b34e0..039083674 100644
--- a/packages/abi-gen/package.json
+++ b/packages/abi-gen/package.json
@@ -8,7 +8,7 @@
"build:watch": "tsc -w",
"lint": "tslint --project . 'src/**/*.ts'",
"clean": "shx rm -rf lib",
- "build": "tsc"
+ "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts"
},
"bin": {
"abi-gen": "lib/index.js"
@@ -35,11 +35,13 @@
},
"devDependencies": {
"@0xproject/tslint-config": "^0.4.10",
+ "@0xproject/dev-utils": "^0.2.1",
"@types/glob": "^5.0.33",
"@types/handlebars": "^4.0.36",
"@types/mkdirp": "^0.5.1",
"@types/node": "^8.0.53",
"@types/yargs": "^10.0.0",
+ "copyfiles": "^1.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.8.0",
diff --git a/packages/abi-gen/scripts/postpublish.js b/packages/abi-gen/scripts/postpublish.js
deleted file mode 100644
index b3e5407c8..000000000
--- a/packages/abi-gen/scripts/postpublish.js
+++ /dev/null
@@ -1,5 +0,0 @@
-const postpublish_utils = require('../../../scripts/postpublish_utils');
-const packageJSON = require('../package.json');
-
-const subPackageName = packageJSON.name;
-postpublish_utils.standardPostPublishAsync(subPackageName); \ No newline at end of file
diff --git a/packages/abi-gen/src/globals.d.ts b/packages/abi-gen/src/globals.d.ts
index 39df3f852..d267a4106 100644
--- a/packages/abi-gen/src/globals.d.ts
+++ b/packages/abi-gen/src/globals.d.ts
@@ -2,3 +2,10 @@ declare function toSnakeCase(str: string): string;
declare module 'to-snake-case' {
export = toSnakeCase;
}
+
+declare module '*.json' {
+ const json: any;
+ /* tslint:disable */
+ export default json;
+ /* tslint:enable */
+}
diff --git a/packages/abi-gen/src/monorepo_scripts/postpublish.ts b/packages/abi-gen/src/monorepo_scripts/postpublish.ts
new file mode 100644
index 000000000..63790a011
--- /dev/null
+++ b/packages/abi-gen/src/monorepo_scripts/postpublish.ts
@@ -0,0 +1,6 @@
+import { postpublishUtils } from '@0xproject/dev-utils';
+
+import * as packageJSON from '../package.json';
+
+const subPackageName = (packageJSON as any).name;
+postpublishUtils.standardPostPublishAsync(subPackageName);