[Dojo-interest] Layered Build

Андрей Бердников tsofistgudmen at gmail.com
Sat Feb 13 06:08:16 EST 2016


Hello!
A long time ago I too was faced with such difficulties, but I was able to
understand.
I recommend you to organize the following layers: dojo/dojo, dijit/dijit,
dojox/dojox, de/myapp
Each layer always includes all dependencies said modules, while files can
be deleted from the other layers. Therefore, if you are certain that in the
layer dijit you do not need the files from the dojo layer select it in the
exceptions.
Similarly, the same should be done with de-myapp: eliminate layers
dojo/dojo, ditij/dijit etc.

Sorry my English..

2016-02-11 23:56 GMT+03:00 Klausen Schaefersinho <klaus.schaefers at gmail.com>
:

> Hi,
>
> sorry for the empty last mail... So I am trying to create a layered build.
> I have one profile file for a bootable dojo distribution that contains only
> the needed files. Now I tried to do a compresses file for my app. The
> profile file looks like:
>
>
> var profile = {
>
> basePath: "./",
>
>     releaseDir: "./release2",
>
>     hasReport: true,
>
>     cssOptimize: 'comments',
>
>     mini: true,
>
> action : "release",
>
>
> stripConsole: 'all',
>
> //layerOptimize: 'closure',
>
>
> selectorEngine: 'lite',
>
>
>
>     packages:[
>
>         {
>
>             name: "dojo",
>
>             location: "../lib/dojo/dojo"
>
>         },
>
>         {
>
>             name: "dijit",
>
>             location: "../lib/dojo/dijit"
>
>         },
>
>         {
>
>             name: "dojox",
>
>             location: "../lib/dojo/dojox"
>
>         },{
>
>             name: "de",
>
>             location: "/de"
>
>         }
>
>     ],
>
>
>
>     layers: {
>
> "de/myapp": {
>
>             include: [
>
>                   "de/myappp/App"
>
>           ],
>
>           exlcude : [
>
>                   "dojo/main",
>
>                 "dojo/_base/browser",
>
>                 "dojo/_base/loader",
>
>                 "dojo/_base/lang",
>
>                 "dojo/dom-class",
>
>                 "dojo/dom-construct",
>
>                 "dojo/dom-style",
>
>                 "dojo/store/Memory",
>
>                 "dojo/_base/Color",
>
>                 "dojo/_base/NodeList",
>
>                 "dojo/cookie",
>
>                 "dojo/query",
>
>                 "dojo/window",
>
>                 "dojo/dom-style",
>
>                 "dojo/_base/window",
>
>                 "dojo/dom",
>
>                 "dojo/touch",
>
>                 "dojo/query",
>
>                 "dojo/_base/declare",
>
>                 "dojo/_base/event",
>
>                 "dojo/_base/lang",
>
>                 "dojo/request/xhr",
>
>                 "dojo/json",
>
>                 "dojo/on",
>
>                 "dojo/has",
>
>                 "dojo/dom",
>
>                 "dojo/topic",
>
>                 "dojo/aspect",
>
>                 "dojo/io-query",
>
>                 "dojo/hash",
>
>                 "dojo/dom-attr",
>
>                 "dojo/request/xhr",
>
>                 "dojo/request",
>
>                 "dojo/_base/window",
>
>                 "dojo/dom-class",
>
>                 "dojo/parser",
>
>
>
>
>
>                 "dijit/_Widget",
>
>                 "dijit/_Templated",
>
>                 "dijit/registry",
>
>
>
>                 "dojox/dtl",
>
>                 "dojox/dtl/Context"
>
>           ]
>
>     }
>
>    }
>
> };
>
>
> I exclude all the dojo libs, as I have them already in the compressed
> dojo_app.js file. In my html in load the layers like:
>
>   <script src="/libs/dojo/dojo_app.js"></script>
>
>   <script src="/libs/myapp/app.js"></script>
>
> However this does not work. I am not sure why this is an issue. Can
> anybody give me a hint. I would prefer to have one core dojo compressed.js
> and several app.js files so I can optimize the loading...
>
>
> Cheers,
>
>
> Klaus
>
>
> --
> “Overfitting” is not about an excessive amount of physical exercise...
>
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> Dojo-interest at mail.dojotoolkit.org
> To unsubscribe, visit:
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20160213/22aa8327/attachment-0001.htm 


More information about the Dojo-interest mailing list