我在 Visual Studio 中设置了一个构建后事件,以使用 durandal 的优化器(它使用 nodejs)来构建 main-built.js 文件以进行生产。得到一个错误,说它找不到 main-built.js。我相信这是因为它没有正确引用我的项目。我的基本目录位于 c:\projects\myapp\myapp。它只是从 c:\projects\myapp 中寻找 durandal 目录。
有没有办法告诉它正确的目录?
这是一些输出。
if 'Release'=='Release' C:\Projects\myapp\myapp\\App\durandal\amd\optimizer.exe
Using default base configuration.
Configuring for deploy with almond (custom).
{
"name": "durandal/amd/almond-custom",
"inlineText": true,
"stubModules": [
"durandal/amd/text"
],
"paths": {
"text": "durandal/amd/text"
},
"baseUrl": "C:\\Projects\\myapp",
"mainConfigFile": "C:\\Projects\\myapp\\main.js",
"include": [
"packages/Durandal.1.1.0/content/App/durandal/app",
...etc...
],
"exclude": [],
"keepBuildDir": true,
"optimize": "uglify2",
"out": "C:\\Projects\\myapp\\main-built.js",
"pragmas": {
"build": true
},
"wrap": true,
"insertRequire": [
"main"
]
}