用/ *开始初始注释的目的。在javascript和css文件 [英] The purpose of starting an initial comment with /*! in javascript and css files

查看:116
本文介绍了用/ *开始初始注释的目的。在javascript和css文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,在javascript或css文件中的初始注释有时开始于/ *!
解释标记的目的是什么?

I've noticed that initial comment in javascript or css files is sometimes started with /*! What is the purpose of the explanation mark?

例如,jquery.js:

For example, jquery.js:

/*! jQuery v1.7.1 jquery.com | jquery.org/license */

bootstrap.css:

bootstrap.css:

/*!
 * Bootstrap v2.0.1
 *
 * Copyright 2012 Twitter, Inc


推荐答案

它会告诉压缩工具,例如 YUICompressor Uglify ,它会将代码缩小,将注释部分留在原处,因为它们通常会从代码中删除所有注释。

It tells compression tools such as the YUICompressor and Uglify, which minify the code, to leave the commented section in place as they usually remove all comments from the code.

这篇关于用/ *开始初始注释的目的。在javascript和css文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆