Answer the question
In order to leave comments, you need to log in
How to add your library to the code editor?
I wrote my own simple library, which is a set of objects with methods. Question: how to connect it to the VS Code code editor so that auto-substitution works when creating / editing other files?
Example:
Library:
libraryName.objectName = {};
libraryName.objectName.move = function (){...}
Usage:
write libraryName see the available set of objects to substitute
write libraryName.objectName. we see a set of methods of the object
It seems to be a banal question, but it is constantly googled that is not right.
Answer the question
In order to leave comments, you need to log in
He should see it anyway, unless of course you connect it as needed.
Through import
or require
, or simply at the beginning of the file, insert the entire code.
For example:
// library.js
class Core {
// code...
}
module.exports = Core;
// app.js
const library = require('./library.js');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question