I'm searching for a way to use Parse JS SDK with Durandal. As Parse JS SDK is a Backbone module it seems to it should be somehow modified. I'm not familiar with Backbone and I can't find a guide which can help me with it. I want to use Parse Java Script SDK as common Durandal (more precisely require.js) module as following:
define(['knockout', 'gmaps', 'durandal/composition'], function (ko, gmaps, composition) {
...
var latLng = new gmaps.LatLng(blah blah);
...
I'm trying to use Parse SDK similarity but have no luck there:
define(['parse'], function(parse) {
console.log('Parse: ' + parse); //undefined
I added a path to it in my config:
requirejs.config({
paths: {
'text': '../lib/require/text',
'async': '../lib/require/plugins/async',
'propertyParser': '../lib/require/plugins/propertyParser',
'goog': '../lib/require/plugins/goog',
'durandal': '../lib/durandal/js',
'plugins': '../lib/durandal/js/plugins',
'transitions': '../lib/durandal/js/transitions',
'bootstrap': '../lib/bootstrap/js/bootstrap',
'knockout': '../lib/knockout/knockout-2.3.0',
'parse': '../lib/parse/parse'
}
});
Inside the SDK module there are really lot of code and I can't understand how it should be modified for further Durandal use. Someone could explain this?
P.S. I see that using the Parse JavaScript SDK is comfortable way to work with Parse BaaS, but if this SDK cannot be converted for my purposes, would not it be too hard to use Parse with pure JS ? I mean without SDK.
Thanks!