我在我的实现中使用requirejs,我正在使用r.js进行优化。我正在运行以下命令:
$ "C:\Program Files\nodejs\node.exe" r.js -o name="system/enduser" out="enduser-built.js" baseUrl=. paths.jquery=em
pty: paths.cookies=empty: paths.errorhandler=empty: paths.jgrowl=empty: paths.recaptcha=empty: paths.blockui=empty:
运行正常并实际生成一个包含来自不同文件的大量代码的文件。但它以某种方式忽略了一些文件,例如我的文件如下所示:
paths: {
// cdn
jquery: '//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min',
jqueryui: '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min',
recaptcha: '//www.google.com/recaptcha/api/js/recaptcha_ajax',
knockout: 'knockout-latest.debug',
underscore: 'underscore',
blockui: 'jquery.blockui',
jgrowl: 'jquery.jgrowl',
infuser: 'infuser-amd',
trafficcop: 'trafficcop-amd',
async: 'require/async',
depend: 'require/depend',
font: 'require/font',
goog: 'require/goog',
image: 'require/image',
json: 'require/json',
noext: 'require/noext',
mdown: 'require/mdown',
propertyParser: 'require/propertyParser',
markdownConverter: 'require/Markdown.Converter',
passwordReset:"System/passwordreset",
//in-house
cookies: 'system/cookies',
errorhandler: 'system/errorhandler'
},
priority: ['jquery']
});
require(["order!jquery",
"order!jqueryui",
"order!knockout",
"order!knockout.mapping-latest.debug",
'order!system/thankyou',
"koExternalTemplateEngine",
"system/account",
"system/passwordReset",
"system/share",
"system/utils",
"system/tos",
"system/surveys",
"system/models/survey_ko",
'system/spinzone',
'system/facebook',
'system/dialogs',
'system/countdown',
'system/registration',
'json2',
'system/ajax',
'domReady!'],
function () {
});
现在,正如您所看到的,它需要来自system / accounts文件夹的Account.js,但它未加载。它已经加载了几个文件,但我不确定是什么原因忽略这些文件。有什么建议吗?