This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/python/yap_kernel/kernel.js

28 lines
626 B
JavaScript
Raw Normal View History

2018-02-01 14:55:09 +00:00
requirejs.config({
map: {
'*' : {
'codemirror/mode/prolog/prolog':'/kernelspecs/yap_kernel/prolog.js'
}
}
});
2017-08-21 12:59:49 +01:00
2018-02-01 01:44:34 +00:00
define([
2018-02-01 14:55:09 +00:00
'codemirror/lib/codemirror',
'base/js/namespace',
'base/js/events',
],function(Jupyter,events,CodeMirror){
var onload = function(){
var mode = {
mime: "text/x-prolog",
name: "Prolog",
mode: "prolog",
ext: ["pl", "yap", "yss", "P"]
};
//console.log("I am being loaded");
CodeMirror.requireMode("prolog", mode);
CodeMirror.setOption("mode",mode);
2017-08-21 12:59:49 +01:00
2018-02-01 14:55:09 +00:00
return {onload:onload};
}});