build_js: Compress and optimize all files in the current folder

Description Usage Arguments

View source: R/jstools.R

Description

Generates a minified file under inst/pkg_name-pkg_version, if mode is prod. If mode is dev, aggregates all js files without mangling or compression.

Usage

1
build_js(dir = "srcjs", mode = c("prod", "dev"), entry_point = "main.js")

Arguments

dir

Default to srcjs.

mode

Production or development mode. Choose either "prod" or "dev". "prod" bundles, aggregates and minifyies files. "dev" only bundles the code. Modules follow the ES6 format (import/export).

entry_point

Required internally to setup the esbuild config.


RinteRface/charpente documentation built on Nov. 25, 2021, 11:11 a.m.