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