Mojo::A...::rollup(3)
β¨ NAME β¨
Mojo::Alien::rollup β runs the external nodejs program rollup. This one lives in the User Contributed Perl Documentation manual, and yes bestie, it's giving βclass that runs an external programβ energy π
π¦ SYNOPSIS π¦
okay so here's the whole group-chat recap:
use Mojo::Alien::rollup;
my $rollup = Mojo::Alien::rollup->new;
# Run once
$rollup->build;
# Build when rollup see files change
$rollup->watch
πΈ DESCRIPTION πΈ
Mojo::Alien::rollup is a class for runnig (yes, spelling exactly like that in the source π) the external nodejs program rollup β link: https://rollupjs.org/ β¨
π ATTRIBUTES π
π§Έ assets_dir
See "assets_dir" in Mojo::Alien::webpack. Same energy, go look there π«Ά
π§Έ binary
$array_ref = $rollup->binary;
$rollup = $rollup->binary('rollup');
The path to the rollup executable. Defaults to the MOJO_ROLLUP_BINARY environment variable, or rollup inside ./node_modules. Fallback to just rollup. π₯
π§Έ config
$path = $rollup->config;
$rollup = $rollup->config(path->to_abs->child('rollup.config.js'));
Holds an /absolute path to rollup.config.js β link: https://rollup.js.org/concepts/configuration/ π
π§Έ dependencies
$hash_ref = $rollup->dependencies;
A hash where the keys can match the items in "include" and the values are lists of packages to install. Keys that do /not match items in "include" will be ignored. This attribute will be used by "init". π«Ά
These dependencies are predefined:
core | rollup @rollup/plugin-commonjs @rollup/plugin-node-resolve
css | cssnano postcss-preset-env rollup-plugin-postcss
eslint | @rollup-plugin-eslint
js | @babel/core @babel/preset-env @rollup/plugin-babel rollup-plugin-terser
sass | cssnano @csstools/postcss-sass postcss-preset-env rollup-plugin-postcss sass
svelte | rollup-plugin-svelte
π§Έ include
See "include" in Mojo::Alien::webpack.
π§Έ mode
See "mode" in Mojo::Alien::webpack.
π§Έ npm
See "npm" in Mojo::Alien::webpack.
π§Έ out_dir
See "out_dir" in Mojo::Alien::webpack.
π οΈ METHODS π οΈ
π asset_map
$hash_ref = $rollup->asset_map;
Parses the filenames in "out_dir" and returns a hash ref with information about the generated assets. Example return value:
{
'entry-name.js' => '/path/to/entry-name.development.js',
'cool-beans.png' => /path/to/f47352684211060f3e34.png',
}
π¨ Note that this method is currently EXPERIMENTAL.
buildβ See "build" inMojo::Alien::webpack.execβ See "exec" inMojo::Alien::webpack.initβ See "init" inMojo::Alien::webpack.pidβ See "pid" inMojo::Alien::webpack.stopβ See "stop" inMojo::Alien::webpack.watchβ See "watch" inMojo::Alien::webpack.
π SEE ALSO π
Mojolicious::Plugin::Webpack and Mojo::Alien::webpack β go click around, bestie π¦
that's the whole page π this one is from perl v5.42.0, dated 2025-09-30, and the footer tag is Mojo::A...::rollup(3) π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Mojolicious-Plugin-Webpack 1.02-bp160.2.1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms