Learn R Programming

⚠️There's a newer version (0.1.3) of this package.Take me there.

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
  • 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

454

Version

0.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

John Coene

Last Published

July 14th, 2021

Functions in packer (0.1.0)

mockup

Mock up
set_yarn

Set yarn path
set_npm

Set npm path
npm_console

Npm Output
yarn_console

Yarn Output
scaffold_output

Scaffold Shiny Output
yarn_clean

Yarn cache clean
scaffold_input

Scaffold a Custom Input
yarn_outdated

Yarn Outdated
yarn_run

Yarn Command
add_plugin_eslint

ESLint Plugin
scaffold_ambiorix

Ambiorix
npm_update

Npm Update
npm_fix

Audit Fix
scaffold_golem

Golem
scaffold_rmd

Golem
scaffold_extension

Shiny Extension
npm_run

Npm Command
npm_outdated

Npm Outdated
types

Install Types
use_loader_babel

Use babel Loader
yarn_upgrade

Yarn Upgrade
use_loader_eslint

Use ESlint
use_loader_coffee

Use Coffee Loader
scaffold_widget

Scaffold Widget
use_loader_file

Use File Loader
use_loader_mocha

Use Mocha Loader
use_loader_vue

Use Vue Loader
use_loader_ts

Use Typescript Loader
npm_install

Install and Uninstall Npm Packages
style_loaders

Use Styles
use_loader_pug

Use Pug Loader
yarn_global

Yarn Global
use_loader_rule

Add a Loader Ru<U+00E9>e
yarn_install

Install and Uninstall yarn Packages
tests

Add Tests
yarn_version

Npm version
apply_react

Apply React
add_plugin_clean

Clean Plugin
bundle

bundle & Watch
engine_console

Npm Output
make_library

Make Library
add_plugin_html

HTML Plugin
apply_vue

Apply Vue
engine

Set Engine
add_plugin_prettier

Prettier Plugin