App-Dapper
view release on metacpan or search on metacpan
lib/App/Dapper.pm view on Meta::CPAN
package App::Dapper;
=head1 NAME
App::Dapper - A publishing tool for static websites.
=cut
use utf8;
use open ':std', ':encoding(UTF-8)';
use 5.8.0;
use strict;
use warnings FATAL => 'all';
use vars '$VERSION';
use Exporter qw(import);
use IO::Dir;
#use Template;
use Template::Alloy;
use Template::Constants qw( :debug );
use Text::MultiMarkdown 'markdown';
use Net::HTTPServer;
use YAML::PP qw/ Load Dump LoadFile DumpFile /;
use File::Spec::Functions qw/ canonpath /;
use File::Path qw(make_path);
use Data::Dumper;
$Data::Dumper::Indent = 1;
$Data::Dumper::Sortkeys = 1;
use DateTime;
use DateTime::Format::XSD;
use App::Dapper::Serve;
use App::Dapper::Init;
use App::Dapper::Utils;
use App::Dapper::Defaults;
use App::Dapper::Filters;
my $DEFAULT_PORT = 8000;
my $ID = 0;
=head1 VERSION
Version 0.21
=cut
our $VERSION = '0.21';
our @EXPORT = qw($VERSION);
=head1 SYNOPSIS
B<Dapper> allows you to transform simple text files into static websites. By installing the App::Dapper Perl module, an executable named C<dapper> will be available to you in your terminal window. You can use this executable in a number of ways:
# Initialize the current directory with a fresh skeleton of a site
$ dapper [-solc] init
# Build the site
$ dapper [-solc] build
# Serve the site locally at http://localhost:8000
$ dapper [-solc] serve
# Rebuild the site if anything (source, layout dirs; config file) changes
$ dapper [-solc] watch
# Get help on usage and switches
$ dapper -h
# Print the version
$ dapper -v
Additionally, B<Dapper> may be used as a perl module directly from a script. Examples:
use App::Dapper;
# Create a Dapper object
my $d = App::Dapper->new();
# Initialize a new website in the current directory
$d->init();
# Build the site
$d->build();
# Serve the site locally at http://localhost:8000
$d->serve();
( run in 1.245 second using v1.01-cache-2.11-cpan-39bf76dae61 )