Combiner
:dart: Combine and minify a list of local or remote CSS and/or Javascript files into a single one with Sublime Text
Details
Installs
- Total 909
- Win 578
- Mac 271
- Linux 60
May 14 | May 13 | May 12 | May 11 | May 10 | May 9 | May 8 | May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Mac | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Combiner
Combine a list of local or remote CSS and/or Javascript files into a single one with Sublime Text. Now, it can also minify CSS, Javascript and/or HTML files using online minifiers.
How to use
Just place the following combiner declaration in any file:
/*
Combiner:{
combine:"/path/to/file1.css",
combine:"/path/to/file2.css",
combine:"/path/to/file3.css",
output:"/path/to/output.file.css"
}
*/
Also you can include multiple Combiner declaration in the same file:
<head>
...
<link rel="stylesheet" href="css/style.css">
...
</head>
<body>
<h1>Hello, world!</h1>
...
<script src=js/scripts.js"></script>
</body>
Or you can create an individual file (txt, json, cfg…) just for Combiner declarations:
{
"Combiner_CSS":{
combine:"/path/to/file1.css",
combine:"/path/to/file2.css",
combine:"/path/to/file3.css",
output:"/path/to/output.file.css"
},
"Combiner_JS":{
combine:"/path/to/file1.js",
combine:"/path/to/file2.js",
combine:"/path/to/file3.js",
output:"/path/to/output.file.js"
},
"Combiner_LIB":{
combine:"/path/to/file1.js",
combine:"/path/to/file2.js",
combine:"/path/to/file3.js",
output:"/path/to/output.file.js"
}
}
Everytime you want to combine files you can use the Context Menu inside the Sublime Text editor window, access the Combiner command under Tools menu in Sublime Text or use the keyboard shortcut: ctrl (super in MacOs X) + alt + c
Remote Files
You can get remote files and combine then in just one local file, only restriction is you have to declare in the same block the same type of files (remote or local)
{
"Combiner_CSS_CDN":{
combine:"https://remote/path/to/file1.css",
combine:"https://remote/path/to/file2.css",
combine:"https://remote/path/to/file3.css",
output:"/local/path/to/output.file.css"
},
"Combiner_CSS":{
combine:"/path/to/file1.css",
combine:"/path/to/file2.css",
combine:"/path/to/file3.css",
output:"/path/to/output.file.css"
},
"Combiner_JS_LIBS":{
combine:"https://remote/path/to/file1.js",
combine:"https://remote/path/to/file1.js",
combine:"https://remote/path/to/file1.js",
output:"/local/path/to/output.file.js"
},
"Combiner_JS":{
combine:"/path/to/file1.js",
combine:"/path/to/file2.js",
combine:"/path/to/file3.js",
output:"/path/to/output.file.js"
}
}
Or even you can use it just to download only a single remote file
{
"Combiner_CSS":{
combine:"https://remote/path/to/file1.css",
output:"/local/path/to/output.file.css"
},
"Combiner_JS_LIBS":{
combine:"https://remote/path/to/file1.js",
output:"/local/path/to/output.file.js"
}
}
Minimize
Also, you can minimize the combined file (or the files you want) using online minifiers created by @andychilton. You just need to use the Context Menu inside the Sublime Text editor window, access the Combiner command under Tools menu in Sublime Text or use the keyboard shortcut: ctrl (super in MacOs X) + alt + m
. A new file will be created in the same location of the open one, with the same name adding suffix min
. You need internet connection to use minification features.
- For HTML files HTML-Minifier is used.
- For Javascript files Javascript-Minifier is used.
- For CSS files CSS-Minifier is used.
Installation
Open the Command Palette and select “Package Control: Install Package”. Search for “Combiner”.