Skip to content

JS CSS minify and combine

Ethan Lai edited this page Sep 3, 2013 · 3 revisions

Combine js files

prepend a file at the begining of another file.

// @koala-prepend "jquery.js"

// jQuery is ready
$(function(){
  // TODO
})

append a file at the end of another file.

// @koala-prepend "jquery.js"
// @koala-append "other.js"

$(function(){
  // TODO
})

// the content of other.js will be combine into here

Combine imported CSS files

@import url("reset.css");
@import "./libs/jquery.ui/jquery.ui.css";

/*For this page*/
body {}

combine import option

Checked Combine Import will combine imported CSS files.

Convert CSS images to base64

Add this parameter behind the relative image url: ?base64.

(This feature only supports css currently.)

Source code:

#test {
	background: url(../img/logo.png?base64) no-repeat;
}

Output Code:

#test {
	background: url(data:image/png;base64,R0lGODlhEAAQAMQAAORHHOVS.....) no-repeat;
}