App-Dapper
view release on metacpan or search on metacpan
#!/usr/bin/perl
=head1 NAME
dapper - A publishing tool for static websites.
=cut
#use utf8;
use open ':std', ':encoding(UTF-8)';
use 5.010;
use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/../lib";
use Pod::Usage;
use Getopt::Mixed;
use App::Dapper;
use File::Monitor;
use File::Find;
use Data::Dumper;
my $COMMAND = undef;
my $SOURCE = "_source";
my $OUTPUT = "_output";
my $LAYOUT = "_layout";
my $CONFIG = "_config.yml";
my $PORT = 8000;
my $HELP = undef;
my $VERSION = undef;
=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 init
# Build the site
$ dapper build
# Serve the site locally at http://localhost:8000
$ dapper serve
# Rebuild the site if anything (source, layout dirs; config file) changes
$ dapper 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();
=head1 DESCRIPTION
Dapper helps you build static websites. To get you started, you can use the
C<dapper init> command to initialize a directory. After running this command,
the following directory structure will be created:
_config.yml
_layout/
index.html
_source/
index.md
( run in 0.552 second using v1.01-cache-2.11-cpan-39bf76dae61 )