From 6eb335544bb2ea11f0513bc7df6f99141435f517 Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 12 Jun 2024 14:20:04 +0200 Subject: [PATCH] doc: example --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f6fbb7e..b7989c6 100644 --- a/README.md +++ b/README.md @@ -51,13 +51,17 @@ cd cowsaywebr webrcli install cowsay ``` -Modify the index.js with this line juste before the end of the function +Add to your index.js ```javascript -await globalThis.webR.evalR('cowsay::say("Hello from R!")'); +// At the top of the script +const { library } = require('spidyr'); + +const cowsay = await library("cowsay"); +await cowsay.say("Hello world"); ``` -Then run +Then, back to your console : ```bash npm start