websites need tests, too
[gitmo/moose-website.git] / inc / Local / Moose / Website / Build.pm
diff --git a/inc/Local/Moose/Website/Build.pm b/inc/Local/Moose/Website/Build.pm
new file mode 100644 (file)
index 0000000..a9a1448
--- /dev/null
@@ -0,0 +1,15 @@
+package Local::Moose::Website::Build;
+use parent 'Module::Build';
+use File::Path qw(make_path);
+
+sub ACTION_code {
+    my ($self) = @_;
+    my $out = $self->destdir;
+    make_path($out);
+    system $^X, 'bin/build_site.pl', '--outdir', $out;
+    $self->add_to_cleanup($out);
+    $self->depends_on('config_data');
+    return;
+}
+
+1;