使用JS Builder 完成css,js压缩

1.下载js builder压缩包.

2.项目中建立jsb2文件,test.js.jsb2

    {  
        "projectName":"ehallService",  
        "deployDir":"ehallService-t249-5540",  
        "licenseText":"",  
        "pkgs":[  
            {  
                "name":"Base",  
                "file":"/jquery-1.8.3.min,form,cookie,jtemplates.js",  
                "fileIncludes":[  
                {  
                    "text":"jquery-1.8.3.min.js",  
                    "path":"/html2/js/common/"    
                },  
                {  
                    "text":"jquery.form.js",  
                    "path":"/html2/js/common/"    
                },  
                {  
                    "text":"jquery.cookie.js",  
                    "path":"/html2/js/common/"    
                },  
                {  
                    "text":"jquery-jtemplates.js",  
                    "path":"/html2/js/common/"    
                }]  
        }]  
    }  

 

 3.执行压缩命令

   java -jar JSBuilder2.jar -p ./test.js.jsb2 -d ./dest1

你可能感兴趣的:(使用JS Builder 完成css,js压缩)