Treat templates as javascript for sourcemap syntax

resolves #638