The documentation for kendo ui and requirejs seems to be missing some things.
They will tell me how to use kendo.web.min, which has everything:
http://www.kendoui.com/blogs/teamblog/posts/13-05-08/requirejs-fundamentals.aspx
(search for the keyword 'shim')
but I'm not interested in adding a large 2MB kendo.web.min script, I just want to fake
kendo.grid.min, but this file has a dependency on kendo.data.min, which again has a dependency
to kendo.core.min.
How can I tell requirejs to download also kendo.data.min and kendo.core.min before downloading kendo.grid.min and after loading jquery. I just think it will be the right order.
This is what I tried from the above telerik link:
requirejs.config({
paths: {
'text': '../Scripts/text',
'durandal': '../Scripts/durandal',
'plugins': '../Scripts/durandal/plugins',
'transitions': '../Scripts/durandal/transitions',
'knockout': '../Scripts/knockout-2.3.0',
'jquery': '../Scripts/jquery-2.0.3',
'kendoGrid': '../Scripts//kendo.grid.min',
},
shim: {
"kendoGrid": {
deps: ["jquery"]
}
}
});
, kendo.data kendo.core?
durandal . js :
" (viewmodels/DocumentBrowser). details: \jQuery\ undefined " ".
, kendo, kendo ui requirejs DocumentBrowser, !
UPDATE
CodingWhitSpike requirejs:
requirejs.config({
paths: {
'text': '../Scripts/text',
'durandal': '../Scripts/durandal',
'plugins': '../Scripts/durandal/plugins',
'transitions': '../Scripts/durandal/transitions',
'knockout': '../Scripts/knockout-2.3.0',
'jquery': '../Scripts/jquery-2.0.3',
'moment': '../Scripts/moment',
k: "../Scripts/kendo"
}
});
define(['durandal/app', 'plugins/dialog', 'knockout', 'services/dataservice', 'plugins/router', 'moment', 'k/kendo.grid.min'],
function (app, dialog, ko, dataservice, router, moment, kendoGrid) {
$("#grid").kendoGrid(...); => kendoGrid is instantiated and it works :)
});