Dojo 压缩CSS

前端之家收集整理的这篇文章主要介绍了Dojo 压缩CSS前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。



1. 在dojo,dijit,dojox,util相同的文件夹中建立 一个文件夹 假设名称叫做 myCss.



2.在myCss文件夹中建立一个myCss.css文件 . 里面包含你想要加载的css样式:


@import "../dojo/resources/dojo.css";
@import "../dijit/themes/claro/claro.css";
@import "../dojox/grid/enhanced/resources/claro/EnhancedGrid.css";
@import "../dojox/grid/enhanced/resources/EnhancedGrid_rtl.css";

3. 参照上一篇编写mydojo.profile.js文件的方式,用于处理该css:


dependencies = {
    
    basePath: "../../../",//
  releaseDir: "erms",action: "release",cssOptimize: "comments",mini: true,stripConsole: "all",action : "clean,release",stripConsole: "normal",selectorEngine:"acme",layers : [

{
name:"myCss.js",dependencies: [
"dojo.loadInit","dojo.text"


]
}

    ],prefixes: [

        [ "dijit","../dijit" ],[ "dojox","../dojox" ],["myCss","../myCss"]

    ]

}
之后可以在erms下看到myCss文件夹. html中只需要引用这个myCSS.css即可 原文链接:https://www.f2er.com/dojo/291291.html

猜你在找的Dojo相关文章