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

Issues with sourceMap #33

Open
aMarCruz opened this issue Nov 2, 2016 · 0 comments
Open

Issues with sourceMap #33

aMarCruz opened this issue Nov 2, 2016 · 0 comments

Comments

@aMarCruz
Copy link

aMarCruz commented Nov 2, 2016

Hi @sidorares ,

I made a little tool (gen-pug-source-map), based on your idea for generating source maps for Pug v2.x

My implementation solves some issues present in yours:

  • Each source file (included and extends) are readed from the file system multiple times, gen-pug-source-map does not read from the file system.
  • Absolute filenames in the property sources can hinder remote debugging.
  • In some cases, line numbering is shifted

Also, you can get the compiled code from gen-pug-source-map with inline templates removed.

If you want test it, please clone my repo, run npm i && npm t and go to http://sokra.github.io/source-map-visualization/#custom, click "Custom..." and upload test/output/app1.js, then load test/output/app1.map.js and try.

Thanks.

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

1 participant