Exporting sourcemaps

Fixes #30
Can I squash the above 3 lines by using some kind of initialization? I tried but didn't succeed.