azproduction / lmd

LMD - JavaScript Module-Assembler for building better web applications :warning: Project is no longer supported :warning:
http://azproduction.ru/lmd/
MIT License
449 stars 27 forks source link

Problems with source maps #174

Closed Darmikon closed 10 years ago

Darmikon commented 10 years ago

I tried to create source maps using Grunt lmd. index.lmd.map "sources":["i18n\en.json","js\common.js","js\main.js","js\views\App.js"] Neither Chrome nor Firefox inspector can see such URLs. If I change manually all double backslashes to slashes "sources":["i18n/en.json","js/common.js","js/main.js","js/views/App.js"] browser's inspectors see source files. Is any option to create Slash dividers in URLs of sources instead of Double Backslashes?

And the second question: can I get in my source map empty value of sourceRoot? "sourceRoot":"". I want to get relative URLs. If I set sourcemap_www: "" in Grunt.js - I receive "sourceRoot":"/" in my source map. If I manually set "sourceRoot":"" in index.lmd.map - relative URLs work fine.

Thank you!

azproduction commented 10 years ago

Thank you and sorry for waiting for 2 days.

Is any option to create Slash dividers in URLs of sources instead of Double Backslashes?

I will replace back slashes with front slashes in build time. Anyway windows supports both slashes.

I want to get relative URLs. If I set sourcemap_www: "" in Grunt.js - I receive "sourceRoot":"/" in my source map.

I will apply default value "/" only if sourcemap_www is undefined, so you can use "" or "./" for relative URLs.

azproduction commented 10 years ago

Fixed lmd@1.11.4