JS\CSS文件合并与文件压缩 - oklai/koala GitHub Wiki
在文件头部插入其他文件内容
// @koala-prepend "jquery.js"
// jQuery is ready
$(function(){
// TODO
})
在文件底部插入其他文件内容
// @koala-prepend "jquery.js"
// @koala-append "other.js"
$(function(){
// TODO
})
// the content of other.js will be combine into here
合并CSS "@import" 文件
@import url("reset.css");
@import "./libs/jquery.ui/jquery.ui.css";
/*For this page*/
body {}
默认不开启这个功能,需选中Combine Import
选项;开启后将合并import文件代码至源文件。
Convert CSS images to base64
css中的图片url可转换为base编码,启用规则为在image url末尾增加参数"?base64".
(注意base64转换仅限本地图片)
Source code:
#test {
background: url(../img/logo.png?base64) no-repeat;
}
Output Code:
#test {
background: url(data:image/png;base64,R0lGODlhEAAQAMQAAORHHOVS.....) no-repeat;
}