Mojo::A...::rollup(3)

πŸ“¦ version 1.02, in opensuse-leap 16.0

✨ 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" in Mojo::Alien::webpack.
  • exec β€” See "exec" in Mojo::Alien::webpack.
  • init β€” See "init" in Mojo::Alien::webpack.
  • pid β€” See "pid" in Mojo::Alien::webpack.
  • stop β€” See "stop" in Mojo::Alien::webpack.
  • watch β€” See "watch" in Mojo::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