dojo build for mvc project

79 views Asked by At

Im trying to create a custom build for an application, my project is in mvc with no root js file,now am trying to build all javascript files into one new js file with dojo version 1.9.3. Build is success but when am trying to load the application with the new build js file,"ïs not a function" error. my javascript files are not full amd converted. profile.js looks like

 var profile = {

    basePath: '../src/',
    releaseDir: "/assets/js_prod/",
    action: 'release',
    mini: true,
    optimize: 'Closure',
    layerOptimize: 'Closure',
    packages: [
        {
           name: "dojo",
            location: "assets/dojo_build/dojo"
        }, {
            name: "js",
            location: "assets/js"
         },{
            name: "dijit",
            location: "assets/dojo_build/dijit"
        },{
            name: "dojox",
            location: "assets/dojo_build/dojox"
        }  /*,{
            name: "css",
            location: "assets/css"
        }  */
    ],
    stripConsole: 'all',
    selectorEngine: 'lite',
    layers: {

          'dojo/dojo': {
            customBase: true,
            boot: true,
        },  
        'js/testbuild': {
        include: [
        'js/abcaction',
        'js/api',
        'js/abc',
        'js/Dropdown',
        'js/abc',
        'js/test',
        'js/datas',
        'js/history',
        'js/library'
        ]
        }
    },

    staticHasFeatures: {
        'dojo-trace-api':0,
        'dojo-log-api':0,
        'dojo-publish-privates':0,
        'dojo-sync-loader':0,
        'dojo-xhr-factory':0,
        'dojo-test-sniff':0 
    }
};

and including build file(testbuild.js) looks like

<script data-dojo-config="async: 1, dojoBlankHtmlUrl: '/blank.html',
        packages: [ {
            name: 'buildjs',
            location: '/assets/js_prod'
        } ]"
    src="/assets/js_prod/dojo/dojo.js"></script>

    require([
                "buildjs/testbuild"
            ], function(testbuild) {

                    testbuild.abcactionInit(false);

            });
0

There are 0 answers