#!/usr/bin/env perl
# ABSTRACT: Run Statocles commands
package statocles;
$statocles::VERSION = '0.024';
# Mojolicious::Commands currently calls GetOptions and clobbers a few of
# our command-line options. Since I don't want to rely on the envvars
# that get set in that process, we'll do this little dance here.
#
# This happens because we build a Mojolicious app inside the Statocles::Command
# module, which loads Mojolicious, which loads Mojolicious::Commands, which
# calls GetOptions on @ARGV
my @argv;
BEGIN { @argv = @ARGV };

use Statocles::Command;
exit Statocles::Command->main( @argv );

__END__

=pod

=head1 NAME

statocles - Run Statocles commands

=head1 VERSION

version 0.024

=head1 SYNOPSIS

    statocles [-v] [--config <file>] [--site <site>] <command>
    statocles -h|--help

=head1 DESCRIPTION

=head1 ARGUMENTS

=head2 <command>

The command to run. Available commands:

    build                   - Build the site
    daemon                  - Run an HTTP daemon to test the built site
    deploy                  - Deploy the site
    bundle theme <name>     - Bundle a theme in the site directory
    apps                    - List the applications in this site
    <app> help              - Get help for a specific application

=head1 OPTIONS

=head2 config <file>

The configuration file to read for Sites. Defaults to C<site.yml>.

The configuration file is a L<Beam::Wire> container file.

=head2 site <name>

The site to use, which is the name of an object in the config file. Defaults to
C<site>.

=head2 -v | --verbose

Display diagnostic information:

=over

=item *

Reading and writing files

=back

=head2 -h | --help

Display this help file

=head1 AUTHOR

Doug Bell <preaction@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Doug Bell.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
