build docs cont.
authorBill Erickson <berick@esilibrary.com>
Wed, 7 May 2014 14:25:49 +0000 (10:25 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 7 May 2014 14:25:49 +0000 (10:25 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/js/ui/default/staff/README.install
Open-ILS/web/js/ui/default/staff/test/data/idl2js.pl [new file with mode: 0755]
Open-ILS/web/js/ui/default/staff/test/data/translate_idl2js.pl [deleted file]

index 064ffab..bc299d8 100644 (file)
@@ -7,6 +7,11 @@
 
 === Install Node.js ===
 
+http://gruntjs.com/[Grunt] and http://jasmine.github.io/[Jasmine] (and
+related bits) allow us to retrieve JS dependencies, run unit tests, and
+concatenate + minify JS files on the server.  They are both Node.js
+plugins.
+
 Node.js does not have have Debian Wheezy build target.  For now, I've opted
 to install from source.  For more, see also 
 https://github.com/joyent/node/wiki/installation[Node.js Installation]
@@ -37,7 +42,7 @@ The remaining steps all take place within the staff JS web root:
 
 [source,sh]
 ------------------------------------------------------------------------------
-% cd Open-ILS/web/js/ui/default/staff/
+% cd $EVERGREEN_ROOT/Open-ILS/web/js/ui/default/staff/
 ------------------------------------------------------------------------------
 
 === Install Project-local Dependencies ===
@@ -52,13 +57,13 @@ from the Node package network.
 
 === Generate test IDL2js Output ===
 
-Unit tests require mock data.  The IDL is needed for practically all tests,
-so there's a script to generate IDL2js output from the in-repo IDL.
+Unit tests require mock data.  Some data is provided as static content, 
+but the IDL JS is generated from the in-repo fm_IDL.xml file via a script:
 
 [source,sh]
 ------------------------------------------------------------------------------
 % cd test/data
-% ./translate_idl2js.pl
+% ./idl2js.pl
 % cd ../../
 ------------------------------------------------------------------------------
 
diff --git a/Open-ILS/web/js/ui/default/staff/test/data/idl2js.pl b/Open-ILS/web/js/ui/default/staff/test/data/idl2js.pl
new file mode 100755 (executable)
index 0000000..fbf998f
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+use strict; use warnings;
+use XML::LibXML;
+use XML::LibXSLT;
+my $out_file = 'IDL2js.js';
+my $idl_file = '../../../../../../../examples/fm_IDL.xml';
+my $xsl_file = '/openils/var/xsl/fm_IDL2js.xsl'; # FIXME: hard-coded path
+
+my $xslt = XML::LibXSLT->new();
+my $style_doc = XML::LibXML->load_xml(location => $xsl_file, no_cdata=>1);
+my $stylesheet = $xslt->parse_stylesheet($style_doc);
+my $idl_doc = XML::LibXML->load_xml(location => $idl_file);
+my $results = $stylesheet->transform($idl_doc);
+my $output = $stylesheet->output_as_bytes($results);
+
+open(IDL, ">$out_file") or die "Cannot open IDL2js file $out_file : $!\n";
+
+print IDL $output;
+
+close(IDL);
+
+
diff --git a/Open-ILS/web/js/ui/default/staff/test/data/translate_idl2js.pl b/Open-ILS/web/js/ui/default/staff/test/data/translate_idl2js.pl
deleted file mode 100755 (executable)
index fbf998f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/perl
-use strict; use warnings;
-use XML::LibXML;
-use XML::LibXSLT;
-my $out_file = 'IDL2js.js';
-my $idl_file = '../../../../../../../examples/fm_IDL.xml';
-my $xsl_file = '/openils/var/xsl/fm_IDL2js.xsl'; # FIXME: hard-coded path
-
-my $xslt = XML::LibXSLT->new();
-my $style_doc = XML::LibXML->load_xml(location => $xsl_file, no_cdata=>1);
-my $stylesheet = $xslt->parse_stylesheet($style_doc);
-my $idl_doc = XML::LibXML->load_xml(location => $idl_file);
-my $results = $stylesheet->transform($idl_doc);
-my $output = $stylesheet->output_as_bytes($results);
-
-open(IDL, ">$out_file") or die "Cannot open IDL2js file $out_file : $!\n";
-
-print IDL $output;
-
-close(IDL);
-
-