Slovo::Command::Author::inflate - Inflate embedded files to domains or application folders
Usage: bin/slovo inflate [OPTIONS] bin/slovo inflate # Same as `mojo inflate`! bin/slovo inflate --class Slovo::Themes::Malka -t \ --path domove/localhost/templates/themes/malka bin/slovo inflate --class Slovo::Themes::Malka -p \ --path domove/localhost/public !Note: When --path is provided, `public` and `templates` will NOT be appended to the path. It is assumed that the user wants the inflated files (-t or -p) exactly in this path. Thus templates and static files will go to the same --path if both -t and -p are provided. If --path is not provided, $slovo->home is used as the path and `public`, and `templates` are appended to the path. Options: -h, --help Show this summary of available options --path <path> Path where the files will be inflated. Defaults to the value of $slovo->home. --class <Class::Name> From which class only to inflate files. Can be repeated several time for several different classes or passed as a comma-separated string. No class by default. --public|p <bool> Should the static files be inflated? No, by default. --templates|t <bool> Should the templates be inflated? No, by default. If no options are provided, the command behaves like `mojo inflate`. Examples: # Inflate ONLY templates from --class to $slovo->home/domove/localhost/templates/themes/malka bin/slovo inflate --class Slovo::Themes::Malka -t --path domove/localhost/templates/themes/malka # Inflate ONLY static files from --class to $slovo->home/domove/localhost/public bin/slovo inflate --class Slovo::Themes::Malka -p --path domove/localhost/public # Inflate BOTH static files and templates from --class to $slovo->home/domove/localhost # Templates will go to $slovo->home/domove/localhost/ # Static files will go to $slovo->home/domove/localhost/ bin/slovo inflate --class Slovo::Themes::Malka -p -t --path domove/localhost # Inflate BOTH static files and templates from --class to $slovo->home # Templates will go to $slovo->home/templates/ # Static files will go to $slovo->home/public/ bin/slovo inflate --class Slovo::Themes::Malka -p -t
Slovo::Command::Author::inflate turns templates and static files embedded in the __DATA__ sections of your application into real files. It is an extended version of Mojolicious::Command::Author::inflate, providing much flexibility and granularity.
__DATA__
Slovo::Command::Author::inflate inherits all attributes from Mojolicious::Command::Author::inflate and implements the following.
my $description = $inflate->description; $inflate = $inflate->description('Foo');
Short description of this command, used for the command list.
my $usage = $inflate->usage; $inflate = $inflate->usage('Foo');
By default this attribute extracts the "SYNOPSIS" section of the documentation, appends to it lists for static files and templates of inflatable classes and returns it. Thus one can decide from which classes and which type of files only to inflate.
Slovo::Command::Author::inflate inherits all methods from Mojolicious::Command::Author::inflate and implements the following new ones.
$inflate->run(@ARGV);
Run this command.
Mojolicious::Command::Author::inflate "WELL-STRUCTURED-APPLICATION" in Mojolicious::Guides::Growing, "Bundling assets with plugins" in Mojolicious::Guides::Rendering, Mojolicious::Renderer, Slovo, Mojolicious::Guides, https://mojolicious.org.
To install Slovo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Slovo
CPAN shell
perl -MCPAN -e shell install Slovo
For more information on module installation, please visit the detailed CPAN module installation guide.