First introduce the function of the next Css-combo: The CSS modular files, packaging merged into a CSS file.
The author gives a detailed explanation of why the tool may need to be used in the project.
Http://www.techcheng.com/study/css/introduce-css-combo.html
Source file hosting address for Ccs-combo:
Https://github.com/daxingplay/css-combo
Since this is a gadget made with Nodejs, we have to install the Nodejs and NPM modules to manage the Operation extensions.
1. Download node. js in the Windows platform installation file
http://nodejs.org/download/
Create the D:\nodejs directory and save the Node.exe in this directory. The "D:\nodejs" is added to the system environment variable path, allowing the node application to be executed at any location.
2. Download the NPM source code:
http://nodejs.org/dist/npm/
Unzip the NPM source code into the D:\npmjs directory, and perform the following operation in the Command Prompt window to complete the installation of NPM:
d:\>-GF
3. Installing Css-combo
NPM install-g Css-combo
NPM install-g Css-combo
4. Using Css-combo
command line, you can go to the directory where you want to package the file, and then
Csscombo Test.source.css Test.combo.css
Batch processing of files that need to be packaged in a project
1. You need to first create a TXT file, such as Pack-list.txt, which has the following structure, similar to a two-dimensional array.
D:\www\test\css\ Source-1.css Source-1.combo.css
D:\www\test\css\ Source-2.css Source-2.combo.css
2. Create a bat to cycle through the contents of the TXT line and execute the Csscombo command directly.
@echo for/F "" %%i in (pack do ( %%i%%j %%i%%k)
Add a combo function to the CSS right-click
1. First is also to create a bat file, used to execute Csscombo when the automatic judgment file to rename the file when adding a combo suffix.
@echo%1 -o%~n1.combo%~x1
2. Then set up a reg file to submit the registry to ensure that the CSS file shell has this command.
5.00 [HKEY_CLASSES_ROOT\cssfile\shell\Combo css]@="Combo CSS" [HKEY_ Classes_root\cssfile\shell\combo css\command]@="d:\\www\\tools\\csscombo.bat%1 "
Using the CSS Merge Packaging tool on Windows Css-combo