Skip to content

cli for building node project with webr inside

Notifications You must be signed in to change notification settings

ColinFay/webrcli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webrcli

[Work in Progress] Please consider the API unstable until v1.0.0 is reached.

cli tools for building node project with webr inside

Install

npm install -g webrcli

Get version

webrcli --version

Init a project

  • Initiate and configure a project:
webrcli init mywebrapp

Command 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/DESCRIPTION

Other functions

  • webrcli installFromPackageJson used when running npm start, so you probably do not need to use it manually. This function takes a package.json file with an rdependencies entry and install the packages listed there.

Working example

cd /tmp
webrcli init cowsaywebr
cd cowsaywebr
webrcli install cowsay

Add 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

About

cli for building node project with webr inside

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published