aboutsummaryrefslogtreecommitdiffstats
path: root/packages/assert
diff options
context:
space:
mode:
Diffstat (limited to 'packages/assert')
-rw-r--r--packages/assert/package.json6
-rw-r--r--packages/assert/scripts/postpublish.js5
-rw-r--r--packages/assert/src/globals.d.ts7
-rw-r--r--packages/assert/src/monorepo_scripts/postpublish.ts6
4 files changed, 17 insertions, 7 deletions
diff --git a/packages/assert/package.json b/packages/assert/package.json
index 49b0f3390..be5f4902d 100644
--- a/packages/assert/package.json
+++ b/packages/assert/package.json
@@ -6,8 +6,8 @@
"types": "lib/src/index.d.ts",
"scripts": {
"build:watch": "tsc -w",
- "build": "tsc",
- "clean": "shx rm -rf _bundles lib test_temp",
+ "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
+ "clean": "shx rm -rf _bundles lib test_temp scripts",
"lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'",
"run_mocha": "mocha lib/test/**/*_test.js",
"prepublishOnly": "run-p build",
@@ -24,12 +24,14 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md",
"devDependencies": {
+ "@0xproject/monorepo-scripts": "^0.1.12",
"@0xproject/tslint-config": "^0.4.10",
"@types/lodash": "^4.14.86",
"@types/mocha": "^2.2.42",
"@types/valid-url": "^1.0.2",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.4",
+ "copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
diff --git a/packages/assert/scripts/postpublish.js b/packages/assert/scripts/postpublish.js
deleted file mode 100644
index b3e5407c8..000000000
--- a/packages/assert/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/assert/src/globals.d.ts b/packages/assert/src/globals.d.ts
index 91ed2021e..5476b6bd8 100644
--- a/packages/assert/src/globals.d.ts
+++ b/packages/assert/src/globals.d.ts
@@ -1 +1,8 @@
declare module 'dirty-chai';
+
+declare module '*.json' {
+ const json: any;
+ /* tslint:disable */
+ export default json;
+ /* tslint:enable */
+}
diff --git a/packages/assert/src/monorepo_scripts/postpublish.ts b/packages/assert/src/monorepo_scripts/postpublish.ts
new file mode 100644
index 000000000..d5fcff9d0
--- /dev/null
+++ b/packages/assert/src/monorepo_scripts/postpublish.ts
@@ -0,0 +1,6 @@
+import { postpublishUtils } from '@0xproject/monorepo-scripts';
+
+import * as packageJSON from '../package.json';
+
+const subPackageName = (packageJSON as any).name;
+postpublishUtils.standardPostPublishAsync(subPackageName);