Dojo构建最终会出现警告,但为什么呢?

时间:2016-09-10 06:56:12

标签: javascript build dojo

我是dojo的新手,我正在尝试学习如何使用dojo版本1.11.2中的实用程序来构建应用程序。我开始阅读这个教程Creating builds - Dojo Toolkit Tutorial并亲自尝试。

我有这个结构: Structure of my project

我的app.profile.js看起来像这样:

var profile = (function(){
    return {
    basePath: "./src",
    releaseDir: "../../app",
    releaseName: "dev",
    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
    },

    packages:[{
        name: "dojo",
        location: "dojo"
    },{
        name: "dijit",
        location: "dijit"
    },{
        name: "dojox",
        location: "dojox"
    },{
        name: "app",
        location: "app"
    }],

    layers: {
        "dojo/dojo": {
            include: [ "dojo/dojo", "dojo/i18n", "dojo/domReady",
                "app/main", "app/run" ],
            customBase: true,
            boot: true
        },
        "app/Dialog": {
            include: [ "app/Dialog" ]
        }
    }
};
})();

我的package.json有这样的内容:

{
"name": "app",
"description": "carDealer",
"version": "1.0",
"keywords": ["JavaScript", "Dojo", "Toolkit", "DojoX"],
"maintainers": [{
    "name": "XY"
}],
"contributors": [{
    "name": "XY"
}],
"licenses": [{
    "type": "AFLv2.1",
    "url": "http://bugs.dojotoolkit.org/browser/dojox/trunk/LICENSE#L43"
},{
    "type": "BSD",
    "url": "http://bugs.dojotoolkit.org/browser/dojox/trunk/LICENSE#L13"
}],
"bugs": "https://github.com/example/issues",
"repositories": [{
    "type": "git",
    "url": "http://github.com/example.git",
    "path": "packages/app"
}],
"dependencies": {
    "dojo": "~1.10.4",
    "dijit": "~1.10.4",
    "dojox": "~1.10.4"
},
"main": "src",
"homepage": "http://not-set-yet.com/",
"dojoBuild": "app.profile.js"
}

总是我试图在Windows操作系统的Powershell中使用给定的build.bat进行测试构建,我收到此失败消息和警告:

enter image description here

如果您有任何建议,请告诉我。我讨厌这个配置的东西。想要开始进行黑客攻击。许多事先提前。

祝你好运。

1 个答案:

答案 0 :(得分:1)

您的app.profile.js位于carDealerBackend/src。 在配置文件中,您可以定义basePath: "./src"。 因此,它会在carDealerBackend/src/src中进行搜索。

尝试将basePath更改为"."