Adds a new export method called attach

adds tests for attach and some minor improvements to others
moved doc comments to separate file
updated copy task to include source map files
publishing distribution files
Bumping version to 1.2.0.