What is the proper way to “install” external scripts in Drafts? For example, I want to include number-in-letters script.
I downloaded index.min.js and rearmed it to “number-in-letters.min.js” It is saved in the Drafts/Library/Scripts folder in iCloud.
I then added a simple script:
const writtenNumber = require('number-in-letters.min.js'); alert(writtenNumber(12));
Running the script results in an Error.
Script Error: TypeError: writtenNumber is not a function. (In 'writtenNumber(12)', 'writtenNumber' is undefined) Line number: 3, Column 20