[svn openjsan.org] [462] A bit more documentation, on the parts that I've written.

0 views
Skip to first unread message

ca...@geeknest.com

unread,
Sep 8, 2005, 1:05:30 PM9/8/05
to jsan-...@googlegroups.com
Revision: 462
Author: theory
Date: 2005-09-08 13:05:23 -0400 (Thu, 08 Sep 2005)

Log Message:
-----------
A bit more documentation, on the parts that I've written.

Modified Paths:
--------------
perl/Module-Build-JSAN/trunk/Changes
perl/Module-Build-JSAN/trunk/lib/Module/Build/JSAN.pm
Modified: perl/Module-Build-JSAN/trunk/Changes
===================================================================
--- perl/Module-Build-JSAN/trunk/Changes 2005-09-08 16:42:24 UTC (rev 461)
+++ perl/Module-Build-JSAN/trunk/Changes 2005-09-08 17:05:23 UTC (rev 462)
@@ -2,6 +2,7 @@

0.02
- Added all authors to META.yml.
+ - Expanded the documentation a bit.

0.01 2005-09-08T05:09:22
- Initial public release.

Modified: perl/Module-Build-JSAN/trunk/lib/Module/Build/JSAN.pm
===================================================================
--- perl/Module-Build-JSAN/trunk/lib/Module/Build/JSAN.pm 2005-09-08 16:42:24 UTC (rev 461)
+++ perl/Module-Build-JSAN/trunk/lib/Module/Build/JSAN.pm 2005-09-08 17:05:23 UTC (rev 462)
@@ -296,26 +296,30 @@

=head1 SYNOPSIS

+In F<Build.PL>:
+
use Module::Build::JSAN;

my $build = Module::Build::JSAN->new(
- module_name => 'Foo-Bar',
+ module_name => 'Foo.Bar',
license => 'perl',
- dist_author => 'Joe Developer <j...@foobar.com>',
- dist_abstract => 'Say something pithy here',
- dist_version => '0.02',
keywords => [qw(Foo Bar pithyness)],
- build_requires => {
- 'Test.Simple' => 0.20,
- },
requires => {
'JSAN' => 0.10,
'Baz-Quux' => 0.02,
},
+ build_requires => {
+ 'Test.Simple' => 0.20,
+ },
);

$build->create_build_script;

+To build a distribution:
+
+ % perl Build.PL
+ % ./Build dist
+
=head1 DESCRIPTION

This is a developer aid for creating JSAN distributions. Please use the example
@@ -330,9 +334,9 @@

=item 1 META.json

-JSAN uses the JSON format instead of the YAML format, as it's legal Javascript
+JSAN uses the JSON format instead of the YAML format as it's legal Javascript
and just plain easier to work with. This means that Module::Build::JSAN will
-generate META.json files instead of META.yml files. Do not be alarmed.
+generate F<META.json> files instead of F<META.yml> files. Do not be alarmed.

=item 2 ./Build deps

@@ -340,6 +344,53 @@
install your dependencies when testing while developing. This will allow you to
develop against the latest versions of the distributions you are building upon.

+=item 3. ./Build dist
+
+This action overrides that provided by Module::Build to extract all
+documentation from your source files or from F<doc/pod> and convert them into
+HTML and plain text representations in F<doc/html> and F<doc/text>,
+respectively. This keeps your F<.js> libraries free of the weight of
+documentation in the distribution.
+
+=item 4. Version, Abstract, Author
+
+Like Module::Build, Module::Build::JSAN will extract the module version
+number, abstract, and author from the JavaScript file for which the
+distribution is named. The abstract and author will only be extracted
+if they are specified in POD in the mode of Perl CPAN modules, i.e.:
+
+ /*
+
+ =head1 NAME
+
+ Foo.Bar - Foo your Bar, baby
+
+ =head1 AUTHOR
+
+ Joe Developer <j...@foobar.com>
+
+ */
+
+The version number will be parsed from the JavaScript code only if it is
+specified in one of the following manners:
+
+ Foo.Bar.VERSION = '0.34';
+
+ Foo.Bar = {
+ VERSION: '0.34'
+ }
+
+If none of these options works for you for some reason, just specify the
+abstract, author, and version number in your F<Build.PL> file:
+
+ my $build = Module::Build::JSAN->new(
+ module_name => 'Foo.Bar',
+ dist_author => 'Joe Developer <j...@foobar.com>',
+ dist_abstract => 'Say something pithy here',
+ dist_version => '0.34',
+ # ...
+ );
+
=back

=head1 BUGS



Reply all
Reply to author
Forward
0 new messages