From 07f826dfb85ed8e010da26460ac9406c52050cdc Mon Sep 17 00:00:00 2001 From: Josh Levine Date: Thu, 21 May 2020 21:28:57 -0400 Subject: [PATCH] dai-plugin-mcd-v1.4.5 --- packages/dai-plugin-mcd/package.json | 11 +++-------- packages/dai-plugin-mcd/scripts/build.sh | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 packages/dai-plugin-mcd/scripts/build.sh diff --git a/packages/dai-plugin-mcd/package.json b/packages/dai-plugin-mcd/package.json index f8118ed62..e89418f0e 100644 --- a/packages/dai-plugin-mcd/package.json +++ b/packages/dai-plugin-mcd/package.json @@ -1,21 +1,16 @@ { "name": "@makerdao/dai-plugin-mcd", "description": "Plugin to add Multi-Collateral Dai support to dai.js", - "version": "1.4.4", + "version": "1.4.5", "license": "MIT", - "files": [ - "dist/**/*", - "umd/*", - "contracts/**/*" - ], - "main": "dist/index.js", + "main": "dist/src/index.js", "browser": "umd/index.js", "unpkg": "umd/index.js", "jsdelivr": "umd/index.js", "scripts": { "build": "yarn clean && yarn build:cjs && yarn build:umd", "build:umd": "webpack --config ../../webpack.config.js", - "build:cjs": "../../scripts/build.sh", + "build:cjs": "./scripts/build.sh", "clean": "rm -rf ./dist ./umd", "prepublishOnly": "yarn build", "testchain": "../../scripts/run-testchain.sh", diff --git a/packages/dai-plugin-mcd/scripts/build.sh b/packages/dai-plugin-mcd/scripts/build.sh new file mode 100644 index 000000000..c0917be8d --- /dev/null +++ b/packages/dai-plugin-mcd/scripts/build.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -e + +if [ "$1" = "dirty" ]; then + echo "Dirty mode: not removing previous build files." +else + rm -rf dist +fi + +babel contracts --out-dir ./dist/contracts +babel src --out-dir ./dist/src + +copyfiles \ + contracts/abis/* \ + contracts/abiMap.json \ + contracts/addresses/* \ + dist