canmove, Confirmed users, Bureaucrats and Sysops emeriti
1,093
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{FeatureStatus | {{FeatureStatus | ||
|Feature name=SourceMap | |Feature name=SourceMap | ||
|Feature stage= | |Feature stage=Development | ||
|Feature status=In progress | |Feature status=In progress | ||
|Feature version=Firefox 9 | |||
|Feature health=OK | |Feature health=OK | ||
|Feature status note=Web Console work is next. | |||
}} | }} | ||
{{FeatureTeam | {{FeatureTeam | ||
| Line 11: | Line 13: | ||
}} | }} | ||
{{FeaturePageBody | {{FeaturePageBody | ||
|Feature overview=Nearly every web developer starts with JavaScript in one form during development and then produces JavaScript in another form for production use. Most often, this is a case of joining files together and minifying the output to reduce the number of requests the browser needs to make and how much data the browser needs to transfer. Another example of JavaScript starting in one form and ending up in the final form used by the browser is in PHP scripts which will sometimes generate bits of JavaScript as they generate their pages. | |Feature overview=Nearly every web developer starts with JavaScript in one form during development and then produces JavaScript in another form for production use. Most often, this is a case of joining files together and minifying the output to reduce the number of requests the browser needs to make and how much data the browser needs to transfer. Another example of JavaScript starting in one form and ending up in the final form used by the browser is in PHP scripts which will sometimes generate bits of JavaScript as they generate their pages. | ||
| Line 49: | Line 29: | ||
You can start with a .coffee file. Any log output or errors generated will refer back to the original .coffee file, rather than the generated .js file. | You can start with a .coffee file. Any log output or errors generated will refer back to the original .coffee file, rather than the generated .js file. | ||
|Feature requirements=* When a sourcemap is available, error messages in console will link to the original source, not the generated JS | |Feature requirements=* When a sourcemap is available, error messages in console will link to the original source, not the generated JS | ||
* Likewise, console log output will link back to the original source | * Likewise, console log output will link back to the original source | ||
| Line 57: | Line 35: | ||
* A specification for generated scripts to refer to their mappings and a mapping format | * A specification for generated scripts to refer to their mappings and a mapping format | ||
* SpiderMonkey needs to output column in addition to source/line. | * SpiderMonkey needs to output column in addition to source/line. | ||
|Feature non-goals=* Ideally, the source mapping file will also work for mapping LESS and similar to CSS. However, implementing the user interface for style source mapping is out of scope for this particular feature. | |Feature non-goals=* Ideally, the source mapping file will also work for mapping LESS and similar to CSS. However, implementing the user interface for style source mapping is out of scope for this particular feature. | ||
* It is possible to have a chain of source maps. Consider the case of a .coffee file that is compiled to .js and run through Closure Compiler. The final source map would refer to lines in the compiled JS, which would have a separate source map referring to lines in the .coffee file. For the first crack at this feature, we will not bother with that case. | * It is possible to have a chain of source maps. Consider the case of a .coffee file that is compiled to .js and run through Closure Compiler. The final source map would refer to lines in the compiled JS, which would have a separate source map referring to lines in the .coffee file. For the first crack at this feature, we will not bother with that case. | ||