Using the CSS Merge Packaging tool on Windows Css-combo

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.