Add doc for node.compile()

This commit is contained in:
Ryan Dahl 2009-09-28 22:16:43 +02:00
parent e972add0ea
commit 4ba5b7e24b
4 changed files with 34 additions and 1 deletions

View File

@ -73,6 +73,15 @@ Returns the current working directory of the process.
</p>
</dd>
<dt class="hdlist1">
<tt>node.compile(source, scriptOrigin)</tt>
</dt>
<dd>
<p>
Just like <tt>eval()</tt> except that you can specify a <tt>scriptOrigin</tt> for better
error reporting.
</p>
</dd>
<dt class="hdlist1">
<tt>__filename</tt>
</dt>
<dd>
@ -2006,7 +2015,7 @@ init (Handle&lt;Object&gt; target)
<div id="footer">
<div id="footer-text">
Version 0.1.12<br />
Last updated 2009-09-28 19:43:15 CEST
Last updated 2009-09-28 21:50:11 CEST
</div>
</div>
</body>

View File

@ -53,6 +53,10 @@ These objects are available to all programs.
+node.cwd()+::
Returns the current working directory of the process.
+node.compile(source, scriptOrigin)+::
Just like +eval()+ except that you can specify a +scriptOrigin+ for better
error reporting.
+__filename+ ::
The filename of the script being executed.

View File

@ -49,6 +49,17 @@ Returns the current working directory of the process.
</varlistentry>
<varlistentry>
<term>
<literal>node.compile(source, scriptOrigin)</literal>
</term>
<listitem>
<simpara>
Just like <literal>eval()</literal> except that you can specify a <literal>scriptOrigin</literal> for better
error reporting.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>__filename</literal>
</term>
<listitem>

View File

@ -50,6 +50,15 @@ node\.cwd()
Returns the current working directory of the process\.
.RE
.PP
node\.compile(source, scriptOrigin)
.RS 4
Just like
eval()
except that you can specify a
scriptOrigin
for better error reporting\.
.RE
.PP
__filename
.RS 4
The filename of the script being executed\.