fixing docs some more
This commit is contained in:
parent
8c57c70fbb
commit
6f15aa78b5
|
@ -66,7 +66,7 @@ Google Chrome should be in @filepath{/contrib/bin/google-chrome}.
|
||||||
|
|
||||||
@section{Usage}
|
@section{Usage}
|
||||||
The @filepath{whalesong} launcher in the subdirectory will compile
|
The @filepath{whalesong} launcher in the subdirectory will compile
|
||||||
programs to standalone @filepath{.xhtml} files.
|
programs to @filepath{.html} and @filepath{.js} files.
|
||||||
|
|
||||||
|
|
||||||
Example usage: using @litchar{whalesong build} to compile a whalesong program.
|
Example usage: using @litchar{whalesong build} to compile a whalesong program.
|
||||||
|
@ -81,7 +81,7 @@ fermi ~/whalesong/examples $ cat hello.rkt
|
||||||
|
|
||||||
fermi ~/whalesong/examples $ ../whalesong build hello.rkt
|
fermi ~/whalesong/examples $ ../whalesong build hello.rkt
|
||||||
|
|
||||||
fermi ~/whalesong/examples $ google-chrome hello.xhtml
|
fermi ~/whalesong/examples $ google-chrome hello.html
|
||||||
Created new window in existing browser session.
|
Created new window in existing browser session.
|
||||||
|
|
||||||
fermi ~/whalesong/examples $
|
fermi ~/whalesong/examples $
|
||||||
|
@ -124,12 +124,16 @@ $
|
||||||
However, it can also be packaged with @filepath{whalesong}.
|
However, it can also be packaged with @filepath{whalesong}.
|
||||||
@verbatim|{
|
@verbatim|{
|
||||||
$ whalesong build hello.rkt
|
$ whalesong build hello.rkt
|
||||||
|
Writing program #<path:/home/dyoo/work/whalesong/examples/hello.js>
|
||||||
|
Writing html #<path:/home/dyoo/work/whalesong/examples/hello.html>
|
||||||
|
|
||||||
$ ls -l hello.xhtml
|
$ ls -l hello.html
|
||||||
-rw-rw-r-- 1 dyoo nogroup 692213 Jun 7 18:00 hello.xhtml
|
-rw-r--r-- 1 dyoo dyoo 3817 2011-09-10 15:02 hello.html
|
||||||
|
$ ls -l hello.js
|
||||||
|
-rw-r--r-- 1 dyoo dyoo 2129028 2011-09-10 15:02 hello.js
|
||||||
}|
|
}|
|
||||||
Running @tt{whalesong build} on a Racket program will produce a self-contained
|
Running @tt{whalesong build} on a Racket program will produce
|
||||||
@filepath{.xhtml} file. If we open this file in our favorite web browser,
|
@filepath{.html} and @filepath{.js} files. If we open this file in our favorite web browser,
|
||||||
we should see a triumphant message show on screen.
|
we should see a triumphant message show on screen.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -281,7 +281,7 @@ Visit @link["http://hashcollision.org/whalesong/examples/dom-play/dom-play.html"
|
||||||
}|}
|
}|}
|
||||||
This program uses the @link["http:/jquery.com"]{JQuery} API provided by @racketmodname[(planet dyoo/whalesong/js)],
|
This program uses the @link["http:/jquery.com"]{JQuery} API provided by @racketmodname[(planet dyoo/whalesong/js)],
|
||||||
as well as the native JavaScript FFI to produce output on the browser.
|
as well as the native JavaScript FFI to produce output on the browser.
|
||||||
If w run Whalesong on this program, and view the resulting @filepath{dom-play.xhtml} in your
|
If w run Whalesong on this program, and view the resulting @filepath{dom-play.html} in your
|
||||||
web browser, we should see a pale, green page with some output.
|
web browser, we should see a pale, green page with some output.
|
||||||
|
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ with generated JavaScript binaries here:
|
||||||
(* x (fact (sub1 x)))]))
|
(* x (fact (sub1 x)))]))
|
||||||
}|}
|
}|}
|
||||||
|
|
||||||
Instead of creating a standalone @tt{.xhtml}, we can use @tt{whalesong} to
|
Instead of creating a standalone @tt{.html}, we can use @tt{whalesong} to
|
||||||
get us the module's code. From the command-line:
|
get us the module's code. From the command-line:
|
||||||
@verbatim|{
|
@verbatim|{
|
||||||
$ whalesong get-javascript fact.rkt > fact.js
|
$ whalesong get-javascript fact.rkt > fact.js
|
||||||
|
|
Loading…
Reference in New Issue
Block a user