Mojo::Alien::rollup - Runs the external nodejs program rollup
use Mojo::Alien::rollup; my $rollup = Mojo::Alien::rollup->new; # Run once $rollup->build; # Build when rollup see files change $rollup->watch
Mojo::Alien::rollup is a class for runnig the external nodejs program rollup.
See "assets_dir" in Mojo::Alien::webpack.
$array_ref = $rollup->binary; $rollup = $rollup->binary('rollup');
The path to the rollup executable. Defaults to MOJO_ROLLUP_BINARY environment variable, or "rollup" inside "./node_modules". Fallback to just "rollup".
MOJO_ROLLUP_BINARY
$path = $rollup->config; $rollup = $rollup->config(path->to_abs->child('rollup.config.js'));
Holds an /absolute path to rollup.config.js.
$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 does /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
See "include" in Mojo::Alien::webpack.
See "mode" in Mojo::Alien::webpack.
See "npm" in Mojo::Alien::webpack.
See "out_dir" in Mojo::Alien::webpack.
$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.
See "build" in Mojo::Alien::webpack.
See "exec" in Mojo::Alien::webpack.
See "init" in Mojo::Alien::webpack.
See "pid" in Mojo::Alien::webpack.
See "stop" in Mojo::Alien::webpack.
See "watch" in Mojo::Alien::webpack.
Mojolicious::Plugin::Webpack and Mojo::Alien::webpack.
To install Mojolicious::Plugin::Webpack, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::Webpack
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::Webpack
For more information on module installation, please visit the detailed CPAN module installation guide.