Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sourcemaps #50

Open
SimenB opened this issue Aug 5, 2015 · 4 comments
Open

Sourcemaps #50

SimenB opened this issue Aug 5, 2015 · 4 comments

Comments

@SimenB
Copy link
Contributor

SimenB commented Aug 5, 2015

[email protected] comes with support for sourcemaps. handlebars-lang/handlebars.js#902

Any chance of supporting them in this plugin? If I open the hbs file in Chrome, I just see the compiled function (I suppose this allows debugging, but still)

duncanbeevers added a commit to duncanbeevers/handlebars-loader that referenced this issue Sep 9, 2015
duncanbeevers added a commit to duncanbeevers/handlebars-loader that referenced this issue Sep 9, 2015
duncanbeevers added a commit to duncanbeevers/handlebars-loader that referenced this issue Sep 9, 2015
@duncanbeevers
Copy link
Contributor

Took a stab at this here: https://github.com/duncanbeevers/handlebars-loader/tree/source-maps

  • Activated by the gulp sourceMap boolean.
  • Won't try to generate sourceMaps for handlebars versions < 3
  • Strips path information, only preserves filename.

@altano
Copy link
Collaborator

altano commented Sep 16, 2015

@duncanbeevers this looks nice and simple, thank you for figuring out how to plumb all that. Can you submit it as a pull request? I think the only comment I'll have is to ask you to use node-semver to do the version comparison instead of manually parsing it.

@duncanbeevers
Copy link
Contributor

Thanks for the feedback. I originally wrote this using semver but wasn't sure about adding another dependency for such a minor comparison. I'll tuck that back in shortly.

Do you have any opinion about the filepath stripping? I'm not all that familiar with gulp (or sourcemaps, for that matter) and wasn't sure about the right way to access that bit of info.

duncanbeevers added a commit to duncanbeevers/handlebars-loader that referenced this issue Sep 18, 2015
duncanbeevers added a commit to duncanbeevers/handlebars-loader that referenced this issue Sep 23, 2015
@maniator
Copy link

@duncanbeevers is there any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants