You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
14 KiB
HTML
2 lines
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>5 Using raco pollen</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="racket.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-racket.css" title="default"/><script type="text/javascript" src="scribble-common.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="scribble-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Pollen:<span class="mywbr"> </span> the book is a program</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="Acknowledgments.html" class="tocviewlink" data-pltdoc="x">Acknowledgments</a></td></tr><tr><td align="right">2 </td><td><a href="Installation.html" class="tocviewlink" data-pltdoc="x">Installation</a></td></tr><tr><td align="right">3 </td><td><a href="Quick_start.html" class="tocviewlink" data-pltdoc="x">Quick start</a></td></tr><tr><td align="right">4 </td><td><a href="The_story_of_Pollen.html" class="tocviewlink" data-pltdoc="x">The story of Pollen</a></td></tr><tr><td align="right">5 </td><td><a href="Using_raco_pollen.html" class="tocviewselflink" data-pltdoc="x">Using <span class="stt">raco pollen</span></a></td></tr><tr><td align="right">6 </td><td><a href="File_formats.html" class="tocviewlink" data-pltdoc="x">File formats</a></td></tr><tr><td align="right">7 </td><td><a href="reader.html" class="tocviewlink" data-pltdoc="x">◊ command overview</a></td></tr><tr><td align="right">8 </td><td><a href="Module_reference.html" class="tocviewlink" data-pltdoc="x">Module reference</a></td></tr><tr><td align="right">9 </td><td><a href="License___source_code.html" class="tocviewlink" data-pltdoc="x">License & source code</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>5 </td><td><a href="Using_raco_pollen.html" class="tocviewselflink" data-pltdoc="x">Using <span class="stt">raco pollen</span></a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">5.1 </td><td><a href="Using_raco_pollen.html#%28part._.Making_sure_raco_pollen_works%29" class="tocviewlink" data-pltdoc="x">Making sure <span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span> works</a></td></tr><tr><td align="right">5.2 </td><td><a href="Using_raco_pollen.html#%28part._raco_pollen%29" class="tocviewlink" data-pltdoc="x"><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span></a></td></tr><tr><td align="right">5.3 </td><td><a href="Using_raco_pollen.html#%28part._raco_pollen_help%29" class="tocviewlink" data-pltdoc="x"><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">help</span></a></td></tr><tr><td align="right">5.4 </td><td><a href="Using_raco_pollen.html#%28part._raco_pollen_start%29" class="tocviewlink" data-pltdoc="x"><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">start</span></a></td></tr><tr><td align="right">5.5 </td><td><a href="Using_raco_pollen.html#%28part._raco_pollen_render%29" class="tocviewlink" data-pltdoc="x"><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">render</span></a></td></tr><tr><td align="right">5.6 </td><td><a href="Using_raco_pollen.html#%28part._raco_pollen_clone%29" class="tocviewlink" data-pltdoc="x"><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">clone</span></a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">5.1<tt> </tt></span><a href="#%28part._.Making_sure_raco_pollen_works%29" class="tocsubseclink" data-pltdoc="x">Making sure <span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span> works</a></td></tr><tr><td><span class="tocsublinknumber">5.2<tt> </tt></span><a href="#%28part._raco_pollen%29" class="tocsubseclink" data-pltdoc="x"><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span></a></td></tr><tr><td><span class="tocsublinknumber">5.3<tt> </tt></span><a href="#%28part._raco_pollen_help%29" class="tocsubseclink" data-pltdoc="x"><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">help</span></a></td></tr><tr><td><span class="tocsublinknumber">5.4<tt> </tt></span><a href="#%28part._raco_pollen_start%29" class="tocsubseclink" data-pltdoc="x"><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">start</span></a></td></tr><tr><td><span class="tocsublinknumber">5.5<tt> </tt></span><a href="#%28part._raco_pollen_render%29" class="tocsubseclink" data-pltdoc="x"><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">render</span></a></td></tr><tr><td><span class="tocsublinknumber">5.6<tt> </tt></span><a href="#%28part._raco_pollen_clone%29" class="tocsubseclink" data-pltdoc="x"><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">clone</span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.0.1.6</span></div><div class="navsettop"><span class="navleft"> </span><span class="navright"> <a href="The_story_of_Pollen.html" title="backward to "4 The story of Pollen"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Pollen: the book is a program"" data-pltdoc="x">up</a> <a href="File_formats.html" title="forward to "6 File formats"" data-pltdoc="x">next →</a></span> </div><h3>5<tt> </tt><a name="(part._.Using_raco_pollen)"></a>Using <span class="stt">raco pollen</span></h3><p>Racket provides centralized command-line options through <span class="RktSym">raco</span> (short for <span class="RktSym">racket</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">command</span><span class="RktMeta"></span>, see <a href="http://docs.racket-lang.org/raco/index.html" data-pltdoc="x"><span class="stt">raco</span>: Racket Command-Line Tools</a>).</p><p>Once you install Pollen, you can access the following Pollen-specific commands through <span class="RktSym">raco</span> using the subcommand <span class="stt">raco pollen</span>.</p><h4>5.1<tt> </tt><a name="(part._.Making_sure_raco_pollen_works)"></a>Making sure <span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span> works</h4><p>Open a terminal window and type:</p><p><table cellspacing="0"><tr><td><p><span class="stt">> raco pollen test</span></p></td></tr></table></p><p>If <span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span> is installed correctly, you’ll see:</p><p><table cellspacing="0"><tr><td><p><span class="stt">raco pollen is installed correctly</span></p></td></tr></table></p><p>But if you get:</p><p><table cellspacing="0"><tr><td><p><span class="stt">raco: Unrecognized command: pollen</span></p></td></tr></table></p><p>You’ll need to fix the problem before proceeding, most likely by reinstalling Pollen (see <span class="RktSym">Installation</span>).</p><h4>5.2<tt> </tt><a name="(part._raco_pollen)"></a><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span></h4><p>Same as <span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">help</span>.</p><h4>5.3<tt> </tt><a name="(part._raco_pollen_help)"></a><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">help</span></h4><p>Displays a list of available commands.</p><h4>5.4<tt> </tt><a name="(part._raco_pollen_start)"></a><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">start</span></h4><p>Starts the project server from the current directory using the default port, which is the value of the parameter <span class="RktSym"><span class="badlink"><span class="RktValLink">world:current-server-port</span></span></span> (by default, port 8080).</p><p>This command can be invoked with two optional arguments.</p><p><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">start</span><span class="stt"> </span><span class="RktVar">path</span> will start the project server in <span class="RktVar">path</span> rather than the current directory.</p><p><table cellspacing="0"><tr><td><p><span class="stt">> raco pollen start ~/path/to/project/</span></p></td></tr></table></p><p><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">start</span><span class="stt"> </span><span class="RktVar">path</span><span class="stt"> </span><span class="RktVar">port</span> will start the project server in <span class="RktVar">path</span> using <span class="RktVar">port</span> rather than <span class="RktSym"><span class="badlink"><span class="RktValLink">world:current-server-port</span></span></span>. This is useful if you want to have multiple project servers running simultaneously.</p><p><table cellspacing="0"><tr><td><p><span class="stt">> raco pollen start ~/path/to/project/</span></p></td></tr><tr><td><p><span class="stt">> raco pollen start ~/path/to/project/scribblings 8088</span></p></td></tr></table></p><p>If you want to start in the current directory but with a different port, use <span class="RktInBG"><span class="hspace"></span><span class="RktIn">.</span><span class="hspace"></span></span> as the path:</p><p><table cellspacing="0"><tr><td><p><span class="stt">> raco pollen start . 8088</span></p></td></tr></table></p><h4>5.5<tt> </tt><a name="(part._raco_pollen_render)"></a><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">render</span></h4><p>Renders all preprocessor source files and then all pagetree files found in the current directory.</p><p>This command can be invoked with extra arguments.</p><p><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">render</span><span class="stt"> </span><span class="RktVar">directory</span> will render the preprocessor source files and pagetree files in the specified directory.</p><p>Alternatively, the command can take a variable number of path arguments. <span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">render</span><span class="stt"> </span><span class="RktVar">path...</span> will render only the paths specified in <span class="RktVar">path...</span>. Consistent with the usual command-line idiom, this can be a single path, a list of paths, or a pattern:</p><p><table cellspacing="0"><tr><td><p><span class="stt">> raco pollen render foo.html.pm</span></p></td></tr><tr><td><p><span class="stt">> raco pollen render foo.html.pm bar.html.pm zam.css.pp</span></p></td></tr><tr><td><p><span class="stt">> raco pollen render *.html.pm</span></p></td></tr></table></p><h4>5.6<tt> </tt><a name="(part._raco_pollen_clone)"></a><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">clone</span></h4><p>Makes a copy of the project directory on the desktop, and removes any source files or other Pollen-related files.</p><p><span class="RktSym">raco</span><span class="stt"> </span><span class="RktSym">pollen</span><span class="stt"> </span><span class="RktSym">clobe</span><span class="stt"> </span><span class="RktVar">directory-path</span> will perform the same copying and filtering, but using <span class="RktVar">directory-path</span> as the destination rather than the desktop.</p><div class="navsetbottom"><span class="navleft"> </span><span class="navright"> <a href="The_story_of_Pollen.html" title="backward to "4 The story of Pollen"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Pollen: the book is a program"" data-pltdoc="x">up</a> <a href="File_formats.html" title="forward to "6 File formats"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html> |