Fail to load prettyDiff code in vanilla javascript

82 views
Skip to first unread message

Erez F.

unread,
Nov 24, 2015, 1:04:30 PM11/24/15
to Pretty Diff
Hi,
I've downloaded v.1.15.17.
I'm trying to consume this version in vanilla javascript, and using requireJS to get the prettydiff.js into my model.

snippet:

define(["myFolder/prettydiff"], function(prettydiff){
...

_oDefaultSettings : {
mode: "parse",
lang: "markup"
},
xxx: function(source) {
this._oDefaultSettings.source = source
return prettyDiff(this.oDefaultSettings)
}
})

The problem is that require fails to load prettydiff:
Uncaught ReferenceError: global is not defined : prettydiff.js:line121

I've placed only the prettydiff.js file in myFolder.
in the past it was sufficient.

do I need to include in myFolder, and also require, additional files?

Reply all
Reply to author
Forward
0 new messages