diff --git a/package.json b/package.json index 6fc0adde8..60708892e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eosjs", - "version": "20.0.1", + "version": "20.0.2", "description": "Talk to eos API", "main": "dist/index.js", "scripts": { @@ -12,7 +12,7 @@ "test": "jest src/tests/*eosjs*", "test-node": "jest src/tests/*node*", "test-all": "yarn test && yarn test-node && yarn cypress", - "build": "tsc -p ./tsconfig.json && cp src/ripemd.es5.js dist/ripemd.js", + "build": "tsc -p ./tsconfig.json && node scripts/copy-ripe-md.js", "build-web": "webpack --config webpack.prod.js && webpack --config webpack.debug.js", "build-production": "yarn build && yarn build-web && yarn test-all", "clean": "rm -rf dist", diff --git a/scripts/copy-ripe-md.js b/scripts/copy-ripe-md.js new file mode 100644 index 000000000..c047379c7 --- /dev/null +++ b/scripts/copy-ripe-md.js @@ -0,0 +1,8 @@ +var fs = require('fs'); +var path = require('path'); +var root = __dirname.replace('scripts', ''); + +if(!fs.existsSync(path.join(root + 'dist'))) + fs.mkdirSync(path.join(root + 'dist')); + +fs.copyFileSync(path.join(root + 'src/ripemd.es5.js'), path.join(root + 'dist/ripemd.js')); \ No newline at end of file