0.0.7 • Published 1 year ago
webrcli v0.0.7
webrcli
EXPERIMENTAL Do not use
cli tools for building node project with webr inside
Install
npm install -g webrcliGet version
webrcli --versionInit a project
- Initiate and configure a project:
webrcli init mywebrappCommand line tools
- Download a webR compiled package and its dependencies:
webrcli install cowsay- Read a DESCRIPTION file and build the webR package library
webrcli installFromDesc $(pwd)/rfuns/DESCRIPTIONOther functions
webrcli installFromPackageJsonused when runningnpm start, so you probably do not need to use it manually. This function takes apackage.jsonfile with anrdependenciesentry and install the packages listed there.
Working example
cd /tmp
webrcli init cowsaywebr
cd cowsaywebr
webrcli install cowsayAdd to your index.js
// At the top of the script
const { library } = require('spidyr');
const cowsay = await library("cowsay");
await cowsay.say("Hello world");Then, back to your console :
npm start