dojo 的压缩

1. 命令

build.bat profile=foo action=release releaseName=myDojo optimize=shrinksafe

$build.sh profile=foo action=release releaseName=myDojo optimize=shrinksafe

2. foo.profile.js


dependencies ={

  layers:  [
      {
      name: "mydojo.js",
      dependencies: [
          "dijit.Button",
          "dojox.wire.Wire",
          "dojox.wire.XmlWire",
          "explosive.space.Modulator"
      ]
      }
  ],

  prefixes: [
      [ "dijit", "../dijit" ],
      [ "dojox", "../dojox" ],
      
  ]

};


3. company example

dependencies ={
    layers:  [ 
        {
        name: "dojo4userlist.js",
        dependencies: [
            "util.doh._browserRunner",
            "util.doh._rhinoRunner",
            "util.doh.runner",
            "dijit.Tooltip", 
            "dijit.form.DateTextBox",           
            "company.UserList",
            "dojo.parser",
            "company.ConfirmDialog"
        ]
        },
        {
        name: "dojo4casestudy.js",
        dependencies: [                       
            "util.doh._browserRunner",
            "util.doh._rhinoRunner",
            "util.doh.runner",
            "dijit.form.Textarea",
            "company.CaseStudyDialog",
            "dojo.parser"  
        ]
        },
        {
        name: "dojo4basicquery.js",
        dependencies: [                       
            "dijit.form.DateTextBox",
            "dojo.parser"  
        ]
        },
        {
        name: "dojo4useradmin.js",
        dependencies: [
            "dijit.TitlePane",
            "dijit.Tooltip",
            "dojo.parser" 
        ]
        },
        {
        name: "dojo4bugcommon.js",
        dependencies: [
            "util.doh._browserRunner",
            "util.doh._rhinoRunner",
            "util.doh.runner",
            "dojo.data.ItemFileReadStore",            
            "dijit.form.ComboBox",
            "dijit.form.DateTextBox",
            "dijit.form.FilteringSelect",
            "company.CommentsDialog",
            "company.UserList",
            "company.BugEnterCommentDlg",
            "company.BugDeferDlg",
            "dojo.parser"  
        ]
        },
        {
        name: "dojo4subscribe.js",
        dependencies: [
            "util.doh._browserRunner",
            "util.doh._rhinoRunner",
            "util.doh.runner",
            "dojo.data.ItemFileReadStore",            
            "dijit.form.ComboBox",
            "dijit.form.FilteringSelect",
            "dijit.layout.ContentPane",
            "dijit.layout.TabContainer",
            "company.CommentsDialog",
            "company.UserList",
            "company.ConfirmDialog",
            "company.WarningDialog",
            "dojo.parser"  
        ]
        }
    ],
    prefixes: [
        [ "dijit", "../dijit" ],
        [ "company", "../company" ],
    ] 
};


4. company command

build.bat profile=foo action=release releaseName=myDojo optimize=shrinksafe

你可能感兴趣的:(dojo)