Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6807ab178b
Fetching contributors…

Cannot retrieve contributors at this time

84 lines (44 sloc) 2.157 kb
Using make:
make
- builds perlito5.js (which runs in node.js)
make test
- tests perlito5.js using node.js
make build-5browser
- builds html/perlito5.js (which runs in the browser)
-- See "Makefile" for more options
Running the tests using "node.js":
# this command will compile "perlito5.js"
perl perlito5.pl -I./src5/lib -Cjs src5/util/perlito5.pl > perlito5.js
# this will run a single test script
node perlito5.js -Isrc5/lib t5/01-perlito/01-sanity.t
# this will run all tests
prove -r -e 'node perlito5.js -I./src5/lib' t5
Compile the compiler to Javascript into perlito5.js:
-- using perl and perlito5.pl:
perl perlito5.pl -I./src5/lib -Cjs src5/util/perlito5.pl > perlito5.js
-- using node.js and perlito5.js:
node perlito5.js -I./src5/lib -Cjs src5/util/perlito5.pl > perlito5-new.js
Compile the compiler to Perl5 using perl:
perl perlito5.pl -I./src5/lib -Cperl5 src5/util/perlito5.pl > perlito5-new.pl
Compile perlito5-in-browser using perl:
perl util-js/make-perlito5-js.sh
Running the tests using "perl":
# this will run all tests
prove -r -e 'perl perlito5.pl -I./src5/lib ' t5
Bootstrap with perl:
time perl perlito5.pl -Isrc5/lib -Cperl5 src5/util/perlito5.pl > perlito5-new.pl && diff perlito5-new.pl perlito5.pl ; cp perlito5-new.pl perlito5.pl
Bootstrap with node.js:
time node perlito5.js -Isrc5/lib -Cjs src5/util/perlito5.pl > perlito5-new.js && diff perlito5-new.js perlito5.js ; cp perlito5-new.js perlito5.js
Minifying the javascript output:
The "jsmin" compressor seems to work, it gives 20% compression:
http://crockford.com/javascript/jsmin
$ sudo port install jsmin # osx
$ jsmin < perlito5.js > mini-perlito5.js
$ nice prove -r -e 'node mini-perlito5.js -I./src5/lib' t5
...
All tests successful.
TODO:
Running the tests using perl6:
# TODO - this is not implemented yet
. util-perl6/setup-perlito5-perl6.sh
find t5/01-perlito/*.t | perl -ne ' print "*** $_"; chomp; print ` perl perlito5.pl -I./src5/lib -Cperl6 $_ > tmp.p6 && perl6 tmp.p6 ` '
Jump to Line
Something went wrong with that request. Please try again.