twitter-bootstrap Bootstrap 3.1.1 - .map 扩展文件的用途是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21766880/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 20:01:52  来源:igfitidea点击:

Bootstrap 3.1.1 - What is the .map extension file used for?

twitter-bootstraptwitter-bootstrap-3

提问by Seong Lee

I need to upgrade an application I'm working on with the latest Bootstrap version but I'm struggling to figure out what an addition of bootstrap.css.mapis for?

我需要使用最新的 Bootstrap 版本升级我正在处理的应用程序,但我正在努力弄清楚添加的内容bootstrap.css.map是什么?

Do I need to have them to have the css work properly?

我需要让它们让 css 正常工作吗?

I did some search before writing this but since it's relatively new, I haven't come across any tangible explanations to this.

我在写这篇文章之前做了一些搜索,但由于它相对较新,我没有遇到任何具体的解释。

回答by Mikko Ohtamaa

It is source map for Firefox and Chrome debuggers.

它是 Firefox 和 Chrome 调试器的源映射。

http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/

http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/

Because the source code is minified/bundled the line numbers do not refer to the orignal files. Source map protocol fixes this, allowing the web debuggers to refer to the original context from where the CSS was generated.

因为源代码被缩小/捆绑,所以行号不引用原始文件。源映射协议修复了这个问题,允许 Web 调试器引用生成 CSS 的原始上下文。

回答by Ahmad Sharif

you can download it and then place it at the same directory of bootstrap.css file

你可以下载它,然后把它放在 bootstrap.css 文件的同一目录下

https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap.css.map

https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap.css.map