=== 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]
[source,sh]
------------------------------------------------------------------------------
-% cd Open-ILS/web/js/ui/default/staff/
+% cd $EVERGREEN_ROOT/Open-ILS/web/js/ui/default/staff/
------------------------------------------------------------------------------
=== Install Project-local Dependencies ===
=== 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 ../../
------------------------------------------------------------------------------
--- /dev/null
+#!/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);
+
+
+++ /dev/null
-#!/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);
-
-