You could do it, For which you would need to use node.js and browserify module to build the coder.js.
- Please follow the instruction on how to download and install node.js and module browserify.
- Download web3.js-0.16.0 from github ( which ever latest version )
- Considering your node.js and browserify is installed,create a file (lets call it index-coder.js) in the root directory of web3.js-0.16.0, with content
var coder = require('./lib/solidity/coder');
// NOTE NOTE the path in the require
// dont override global variable
if (typeof window !== 'undefined' && typeof window.coder === 'undefined') {
window.coder = coder;
}
module.exports = coder;
browserify index-coder.js -o bundled.js
command in the root of the web3.js-0.16.0, directory where the index-coder.js was created.
Step 4: You will have a file named bundled.js which contains the coder code.
I have the github location https://github.com/The-Neo-Noir/BloodbankEventDapp/tree/master/js/bundled.js created with an example of how to use the coder.js ( bundled.js) as well.