# 5 Using raco pollen

▼ |  | Pollen: the book is a program

1 | Installation
2 | Quick tour
3 | Backstory
4 | System overview
5 | Using raco pollen
6 | File formats
7 | ◊ command overview
8 | Module reference
9 | Acknowledgments
10 | License & source code
| Index

► | 5 | Using raco pollen

5.1 | Making sure raco pollen works
5.2 | raco pollen
5.3 | raco pollen help
5.4 | raco pollen start
5.5 | raco pollen render
5.6 | raco pollen clone

On this page:

5.1`` Making sure raco pollen works
5.2`` raco pollen
5.3`` raco pollen help
5.4`` raco pollen start
5.5`` raco pollen render
5.6`` raco pollen clone

6.0
top ← prev up next →

### 5`` Using raco pollen

Racket provides centralized command-line options through raco (short for racket command, see raco: Racket Command-Line Tools).

Once you install Pollen, you can access the following Pollen-specific commands through raco using the subcommand raco pollen.

#### 5.1`` Making sure raco pollen works

Open a terminal window and type:

> raco pollen test

If raco pollen is installed correctly, you’ll see:

raco pollen is installed correctly

But if you get:

raco: Unrecognized command: pollen

You’ll need to fix the problem before proceeding, most likely by reinstalling Pollen (see Installation).

#### 5.2`` raco pollen

Same as raco pollen help.

#### 5.3`` raco pollen help

Displays a list of available commands.

#### 5.4`` raco pollen start

Starts the project server from the current directory using the default port, which is the value of the parameter world:current-server-port (by default, port 8080).

This command can be invoked with two optional arguments.

raco pollen start path will start the project server in path rather than the current directory.

> raco pollen start ~/path/to/project/

raco pollen start path port will start the project server in path using port rather than world:current-server-port. This is useful if you want to have multiple project servers running simultaneously.

> raco pollen start ~/path/to/project/
> raco pollen start ~/path/to/project/scribblings 8088

If you want to start in the current directory but with a different port, use . as the path:

> raco pollen start . 8088

#### 5.5`` raco pollen render

Renders all preprocessor source files and then all pagetree files found in the current directory.

This command can be invoked with extra arguments.

raco pollen render directory will render the preprocessor source files and pagetree files in the specified directory.

Alternatively, the command can take a variable number of path arguments. raco pollen render path... will render only the paths specified in path.... Consistent with the usual command-line idiom, this can be a single path, a list of paths, or a pattern:

> raco pollen render foo.html.pm
> raco pollen render foo.html.pm bar.html.pm zam.css.pp
> raco pollen render *.html.pm

#### 5.6`` raco pollen clone

Makes a copy of the project directory on the desktop, and removes any source files or other Pollen-related files.

raco pollen clobe directory-path will perform the same copying and filtering, but using directory-path as the destination rather than the desktop.

top ← prev up next →