简体   繁体   中英

Need help in creating dojo build profile

My requirment is to build dojo in a separate war and use it in application war file . for this I need to create build profile with all the required dojo components in my application . Can someone help me with an example how to achive this. i have created a profile which is not working , below is the profile I have cretaed .

var profile = (function(){
    return {
        basePath: "/dojo-war/src/main/webapp/resources",
        releaseName: "dojo191",
        action: "release",
        layerOptimize: "closure",
        optimize: "closure",
        cssOptimize: "comments",
        mini: true,
        stripConsole: "warn",
        selectorEngine: "lite",

        defaultConfig: {
            hasCache:{
                "dojo-built": 1,
                "dojo-loader": 1,
                "dom": 1,
                "host-browser": 1,
                "config-selectorEngine": "lite"
            },
            async: 1
        },

        staticHasFeatures: {
            "config-deferredInstrumentation": 0,
            "config-dojo-loader-catches": 0,
            "config-tlmSiblingOfDojo": 0,
            "dojo-amd-factory-scan": 0,
            "dojo-combo-api": 0,
            "dojo-config-api": 1,
            "dojo-config-require": 0,
            "dojo-debug-messages": 0,
            "dojo-dom-ready-api": 1,
            "dojo-firebug": 0,
            "dojo-guarantee-console": 1,
            "dojo-has-api": 1,
            "dojo-inject-api": 1,
            "dojo-loader": 1,
            "dojo-log-api": 0,
            "dojo-modulePaths": 0,
            "dojo-moduleUrl": 0,
            "dojo-publish-privates": 0,
            "dojo-requirejs-api": 0,
            "dojo-sniff": 1,
            "dojo-sync-loader": 0,
            "dojo-test-sniff": 0,
            "dojo-timeout-api": 0,
            "dojo-trace-api": 0,
            "dojo-undef-api": 0,
            "dojo-v1x-i18n-Api": 1,
            "dom": 1,
            "host-browser": 1,
            "extend-dojo": 1
        },
       resourceTags: {
            copyOnly: function(filename, mid){
                return (/^app\/resources\//.test(filename) && !/\.css$/.test(filename));
                // Tag our copy only files
            },

            amd: function(filename, mid){
                return !copyOnly(filename, mid)
                    && /\.js$/.test(filename);
                // If it isn't a test resource, copy only,
                // but is a .js file, tag it as AMD
            },
            miniExclude: function(filename, mid){
                return /\/demos\//.test(mid);
            }
        },
        packages:[{
            name: "dojo",
            location: "dojo"
        },{
            name: "dijit",
            location: "dijit"
        },{
            name: "dojox",
            location: "dojox"
        }
        ],

        layers: {
            "dojo/dojo": {
                include: [ "dojo/dojo", "dojo/i18n", "dojo/domReady","dojo/parser","dojo/window", 'dojo/dom-geometry', 'dojo/dom-style',"dojo/_base/fx",'dojo/_base/declare','dojo/dom',"dojo/_base/window",'dojo/query',"dojo/_base/lang",'dojo/ready','dojo/_base/xhr'],
                customBase: true,
                boot: true
            },
            "dojo/dijit": {
                include: [ "dijit/layout/BorderContainer",'dijit/layout/ContentPane','dijit/layout/TabContainer',
            "dijit/form/Form", 'dijit/form/TextBox','dijit/form/Textarea', 'dijit/form/Select',
            'dijit/form/ValidationTextBox', 'dijit/form/Button',
            'dijit/layout/StackContainer','dijit/registry' ]
            },"dojo/dojox": {
                include: [ "dojox/grid/enhanced/plugins/Pagination",'dojox/data/QueryReadStore','dojox/grid/EnhancedGrid','dojo/data/ItemFileReadStore' ]
            }
        }
    };
})();

perhaps the problem is that your quotations are mixed between single quotes and double quotes?

the sample i have has the

"dojo/dojo": {

as

'dojo/dojo': {

also the includes are double quoted

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM