Skip to content
On this page

NodeJS packages install & use

Clipboard use case RTILA is able to download and install almost any NodeJS package on the local machine, so that you can then call and use the new “server side” functionalities that would otherwise not be available if using only our classic Execute JavaScript command. This opens up a tremendous opportunity for rapid deployment of new commands and functionalities without waiting for a core update of RTILA software.

The Clipboard Copy Paste Custom Command is a good example of how we are downloading and using the “clipboardy” package. You need to make sure to add enough wait time for the package to download and then to be called and executed by the Custom Command. Please reverse-learn from this example the time that we provide a more detailed documentation for developers about this subject.

See below the code used and how we download/install then use an external NodeJS package:

js
// script.js
// ....
await manager.install("clipboardy", "^2.3.0"); // install package equivelent to ""npm install clipboardy@2.3.0""
const clipboardy = manager.require("clipboardy"); // import package
// ....