moved config defaults block to allow opts injection
added build system for commonjs modules for each target
added test examples