WWW::Bootstrap - fetch, build and use the Bootstrap CSS Framework
my $bootstrap = WWW::Bootstrap->(workdir => '/tmp');
# set a few variables
$bootstrap->set_variable(body-bg => '#fefefe');
$bootstrap->set_variable(font-base-size => '15px');
# fetch the bootstrap archive from github
# OR use a local copy of the github archive
# update the *.less files
# generate the css and js files
# copy the files to your document root
WWW::Bootstrap wrapps downloading, editing less files and generating css files for the Bootstrap framework
Create a new Bootstrap Instance. Valid arguments are:
Path to the working directory to use.
Defaults to /tmp/bootstrap
URL to download bootstrap source archive.
Defaults to https://github.com/twbs/bootstrap/archive/master.zip
List of features to disable during build-time.
See also: "disable_feature($feature)"
Hash refernce of variables to be overwritten in varaibles.less
See also: "set_variable($var => $val)"
Disable a feature during buildtime by disabling the matching lessfile. $feature must be the namepart of a file in less/, for example "scaffolding" for less/scaffolding.less:
Set the value of a variable in variables.less. $var must be the variable name without leading @.
$boostrap->set_value(body-bg => '#fefefe');
For a full list of variables, have a look at http://getbootstrap.com/customize/#less-variables.
Fetch and extract the bootstrap sourcecode from github. If the optional parameter $zipfile is given, it will be used as path to a local copy of the ZIP file, instead of fetching it via HTTP.
Updates the less/*.less files to reflect the currently disabled features and the updated variables.
Generates the CSS and JS files. After the process is done, the new files are located in the bootstrap-master/dist folder in the working directory.
Copies the current content of the dist/ folder to the $target_dir. If @path_elements, the elements will be used to construct the target path with "catfile" in File::Spec. The target directory will be created if it does not already exist.
The build process requires node.js to be installed to generate the CSS and JS files.
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
To install WWW::Bootstrap, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.