Learn R Programming

Website | Installation | Get Started | Book

An opinionated framework for using JavaScript with R

At its core packer consists of functions to scaffold R packages powered by webpack and npm, these take the form of scaffolds which are built on top of packages. All of the scaffolds below thus need to be run from within an R package.

Things you can do with packer

  • Use npm packages with htmlwidgets
  • Create your shiny UI with the pug templating engine
  • Include React/Vue in you shiny application
  • Bundle JavaScript files for golem
  • Scope CSS selectors
  • Use Lit web components
  • And so much more...

Usage

Always start from an empty package and run scaffold_* to set up the required basic structure.

packer::scaffold_input("<name_of_input>")

Once the scaffold laid down you can either bundle the JavaScript or watch for changes as you develop it.

packer::bundle()

You can then document and install the package to try it out.

Install

Get the stable version from CRAN:

install.packages("packer")

Get the development version from Github with remotes.

# install.packages("remotes")
remotes::install_github("JohnCoene/packer")

Copy Link

Version

Install

install.packages('packer')

Monthly Downloads

457

Version

0.1.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

John Coene

Last Published

May 28th, 2022

Functions in packer (0.1.3)

apply_vue

Apply Vue
use_loader_pug

Use Pug Loader
yarn_install

Install and Uninstall yarn Packages
put_precommit_hook

Put Pre-Commit Hook
prod_roclet

Roclet Prod
scaffold_ambiorix

Ambiorix
put_test

Put a Test
yarn_global

Yarn Global
use_loader_mocha

Use Mocha Loader
mockup

Mock up
jsdoc

Add Plugin jsdoc
engine

Set Engine
npx

NPX
include_action_check

Github Actions
engine_console

Npm Output
npm_update

Npm Update
put_rprofile_adapt

Rprofile
scaffold_leprechaun

Leprechaun
scaffold_output

Scaffold Shiny Output
put_recommended

Recommended Checks
npm_console

Npm Output
dev_roclet

Roclet Dev
ease_lit

Lit
npm_outdated

Npm Outdated
make_library

Make Library
use_loader_file

Use File Loader
scaffold_widget

Scaffold Widget
npm_install

Install and Uninstall Npm Packages
use_loader_framework7

Use Framework7 Loader
engine_check

Engine Check
npm_fix

Audit Fix
yarn_version

Npm version
scaffold_rmd

Golem
yarn_upgrade

Yarn Upgrade
scaffold_bare

Bare
npm_run

Npm Command
scaffold_extension

Shiny Extension
scaffold_input

Scaffold a Custom Input
use_tailwind

Use Tailwind
types

Install Types
tests

Add Tests
scaffold_golem

Golem
use_loader_vue

Use Vue Loader
use_loader_svelte

Use Svelte Loader
use_loader_ts

Use Typescript Loader
use_loader_babel

Use babel Loader
use_loader_coffee

Use Coffee Loader
set_npm

Set npm path
use_loader_style

Use Styles Loader
use_loader_rule

Add a Loader rule
yarn_outdated

Yarn Outdated
yarn_clean

Yarn cache clean
set_yarn

Set yarn path
yarn_console

Yarn Output
yarn_run

Yarn Command
bundle

bundle & Watch
checks

Checks
add_plugin_clean

Clean Plugin
add_plugin_eslint

ESLint Plugin
add_plugin_html

HTML Plugin
add_plugin_prettier

Prettier Plugin
apply_framework7

Apply Framework7
add_plugin_workbox

Progressive Web Applications
apply_react

Apply React