javascript - Dojo build 1.7 built packages does not work -


i'm @ beginning of building project , errors couldn't realize why being occured.

you can see contents of my app.profile.js file below. execute "build profile=../../app.profile.js -r" line command prompt , no error after process done. problem if copy release(built) version of these packages place unbuilt versions exist, many javascript errors "error: multipledefine". if copy dojo, dojox , dijit folders, same errors keep occuring.

when differences between built , unbuilt of 2 js files, (for example dojo/deferred) difference realize this:

//built  define("dojo/deferred", [          "./_base/lang",          "./promise/cancelerror",          "./promise/promise"  ], function(  

define([          "./_base/lang",          "./promise/cancelerror",          "./promise/promise"  ], function(  

so i'm little bit stucked @ beginning. want try using layers reduce http requests possible need situation mentioned. appreciated, thanks.

app.profile.js:

var profile = {      basepath: "..",      layeroptimize: "shrinksafe.keeplines",      optimize: "shrinksafe",      releasedir: "./release",      hasreport: true,       packages: [          {              name: "dojo",              location: "./dojo"          },           {              name: "dijit",              location: "./dijit"          },           {              name: "app",              location: "./app"          },          {              name: "dtk",              location: "./dtk"          },          {              name: "dojox",              location: "./dojox"          }      ],       layers: {          "app/layers/core": {              include: [                          "dojo/_base/declare",                          "dtk/core/ilifecycle",                          "dtk/core/appconfig",                          "dtk/core/topiccontext",                          "dtk/core/navigationcontext",                          "dojo/require",                          "dojo/_base/deferred",                    "dojo/deferredlist",                          "dojo/_base/lang"              ]          },          "app/layers/appcontext": {              include: [                  "dtk/core/appcontext"              ],              exclude: [                  "app/layers/core"              ]           }       }  }; 

the dojo builder add module identifier every module definition unless tell not to. can produce multipledefine error.

from builder documentation:

insertabsmids (default = undefined)

  • [truthy] causes transform ensure every amd define application includes module identifier argument.
  • [falsy] transform nothing module identifier argument in define applications. in particular, falsy value doe not cause transform remove module identifier argument exists in source code.

i having same problem until added insertabsmids:false profile.

eg:

var profile = {     basepath: "./",     releasedir: "release",     action: "release",      layeroptimize: "shrinksafe",     optimize: "shrinksafe",     cssoptimize: "comments",     mini: false,     insertabsmids: false,      packages: [         { name: "dijit", location :"dijit" },         { name: "dojox", location :"dojox" },         { name: "dojo", location :"dojo" }     ] } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -