के लिए टर्नज मैं नोडजेस और टर्न का उपयोग कर जेएस फ़ाइल के स्वत: पूर्णता को मुद्रित करने की कोशिश कर रहा हूं। टर्नज में मैंने कभी देखा है सबसे खराब दस्तावेज है।नोडजेस स्वत: पूर्ण
var tern = require("tern")
var ternServer = new tern.Server({})
var requestDetails = {
"query": {
"type": "completions",
"file": "myfile.js",
"end": {"line":0,"ch":3},
"types":true,
"includeKeywords":true,
"sort":true,
"guess":true,
"docs":true,
"urls":true,
"origins":true,
"lineCharPositions":true,
"caseInsensitive":true
},
"files": [
{
"type": "full",
"name": "myfile.js",
"text": 'req'
}
]
}
ternServer.request(requestDetails, function(error, success){
console.log(success);
});
यह काम नहीं कर रहा है, हालांकि अगर मैं इसे उपयोग करता हूं तो यह जारी रहता है और स्थिर होता है। लेकिन उसके बाद नहीं। जबकि परमाणु प्लगइन में यह प्रदान किया गया मॉड्यूल स्वत: पूर्ण की आवश्यकता है। क्या मैं कुछ भूल रहा हूँ।
इसके अलावा इस .tern-प्रोजेक्ट फाइल
{
"ecmaVersion": 6,
"libs": [
"browser",
"jquery",
"requirejs",
"commonjs"
],
"plugins": {
"complete_strings": {
"maxLength": 15
},
"node": {},
"lint": {},
"doc_comment": {
"fullDocs": true,
"strong": true
}
}
}
त्रुटि प्रबंधन जोड़ने के लायक। console.log (त्रुटि) ;. यह आपको असफल होने के लिए एक सुराग दे सकता है। – omer727