Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Github now supports tables?

  • Loading branch information...
commit f52a25c33fb7ff7db3556f415c5b52530389d147 1 parent 40f849c
@dsc authored
Showing with 17 additions and 225 deletions.
  1. +17 −225 README.md
View
242 README.md
@@ -48,231 +48,23 @@ npm link
The compiler middleware takes a settings object, minimally containing a list of compilers to
enable (`enabled`). Most uses will also specify a source directory (`src`).
-<table>
- <thead>
- <tr>
- <th>
- name
- </th>
- <th>
- type
- </th>
- <th>
- default
- </th>
- <th>
- description
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <strong>enabled</strong>
- </td>
- <td>
- <code>String</code>, <code>String[]</code>
- </td>
- <td></td>
- <td>
- <strong>Required</strong> Enabled compiler id(s). See below for included compilers.
- </td>
- </tr>
- <tr>
- <td>
- <strong>src</strong>
- </td>
- <td>
- <code>String</code>, <code>String[]</code>
- </td>
- <td>
- cwd
- </td>
- <td>
- Directories to search for source files to compile.
- </td>
- </tr>
- <tr>
- <td>
- <strong>dest</strong>
- </td>
- <td>
- <code>String</code>
- </td>
- <td>
- <code>src</code> or<br>
- <code>src[0]</code> if Array
- </td>
- <td>
- Directory to write compiled result.
- </td>
- </tr>
- <tr>
- <td>
- <strong>roots</strong>
- </td>
- <td>
- <code>{src:dest, ...}</code>,<br>
- <code>[[src, dest], ...]</code>
- </td>
- <td></td>
- <td>
- Allows you to specify multiple, ordered <code>src</code>-<code>dest</code> pairs. One of <code>roots</code> or <code>src</code> is required; <code>roots</code> takes precedence over <code>src</code> if present.
- </td>
- </tr>
- <tr>
- <td>
- <strong>log_level</strong>
- </td>
- <td>
- <code>String</code> , <code>Number</code>
- </td>
- <td>
- <code>WARN</code>
- </td>
- <td>
- Logging verbosity. Valid values (case-insensitive): <code>error</code>, <code>warn</code>, <code>info</code>, <code>debug</code>, <code>silent</code>, or a numeric constant (as found in <code>LOG</code>).
- </td>
- </tr>
- <tr>
- <td>
- <strong>create_dirs</strong>
- </td>
- <td>
- <code>Boolean</code>
- </td>
- <td>
- <code>true</code>
- </td>
- <td>
- Creates intermediate directories for destination files.
- </td>
- </tr>
- <tr>
- <td>
- <strong>mount</strong>
- </td>
- <td>
- <code>String</code>
- </td>
- <td></td>
- <td>
- Prefix trimmed off request path before matching/processing.
- </td>
- </tr>
- <tr>
- <td>
- <strong>delta</strong>
- </td>
- <td>
- <code>Number</code>
- </td>
- <td>
- <code>0</code>
- </td>
- <td>
- Delta <code>mtime</code> (in seconds) required for a derived file to be considered stale, and therefore recompiled. By default, any change will cause a file to be recompiled on next request.
- </td>
- </tr>
- <tr>
- <td>
- <strong>expires</strong>
- </td>
- <td>
- <code>Boolean</code>
- </td>
- <td>
- <code>false</code>
- </td>
- <td>
- Automatically treat files as stale if this old in secs.
- </td>
- </tr>
- <tr>
- <td>
- <strong>external_timeout</strong>
- </td>
- <td>
- <code>Number</code>
- </td>
- <td>
- <code>3000</code>
- </td>
- <td>
- Milliseconds after which to kill subprocess commands.
- </td>
- </tr>
- <tr>
- <td>
- <strong>cascade</strong>
- </td>
- <td>
- <code>Boolean</code>
- </td>
- <td>
- <code>false</code>
- </td>
- <td>
- Invoke all compilers that match? otherwise, only first.
- </td>
- </tr>
- <tr>
- <td>
- <strong>resolve_index</strong>
- </td>
- <td>
- <code>Boolean</code> , <code>String</code>
- </td>
- <td>
- <code>false</code>
- </td>
- <td>
- If <code>true</code>-y, directories are resolved with the supplied filename, where <code>true</code> maps to <code>'index.html'</code>.
- </td>
- </tr>
- <tr>
- <td>
- <strong>ignore</strong>
- </td>
- <td>
- <code>RegExp</code>
- </td>
- <td>
- <code>/\.(jpe?g|gif|png)$/i</code>
- </td>
- <td>
- Requests matching this pattern are short-circuit ignored, and no compiler matching occurs.
- </td>
- </tr>
- <tr>
- <td>
- <strong>allowed_methods</strong>
- </td>
- <td>
- <code>String[]</code>
- </td>
- <td>
- <code>['GET']</code>
- </td>
- <td>
- HTTP methods compiler should process. This setting is global-only -- per-compiler overrides specified via <code>options</code> will have no effect.
- </td>
- </tr>
- <tr>
- <td>
- <strong>options</strong>
- </td>
- <td>
- <code>{compilerId:settings, ...}</code>
- </td>
- <td></td>
- <td>
- Hash of additional per-compiler options, mapped by compiler id. Each compiler is supplied a copy of the <code>settings</code> object; if additional options are supplied in this way for a given compiler, they will be merged into the settings (and override any colliding top-level keys).
- </td>
- </tr>
- </tbody>
-</table>
-
+| name | type | default | description |
+| -------------------- | --------------------------------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **enabled** | `String`, `String[]` | | **Required** Enabled compiler id(s). See below for included compilers. |
+| **src** | `String`, `String[]` | cwd | Directories to search for source files to compile. |
+| **dest** | `String` | `src` or <br/> `src[0]` if Array | Directory to write compiled result. |
+| **roots** | `{src:dest, ...}`, <br/> `[[src, dest], ...]` | | Allows you to specify multiple, ordered `src`-`dest` pairs. One of `roots` or `src` is required; `roots` takes precedence over `src` if present. |
+| **log_level** | `String` , `Number` | `WARN` | Logging verbosity. Valid values (case-insensitive): `error`, `warn`, `info`, `debug`, `silent`, or a numeric constant (as found in `LOG`). |
+| **create_dirs** | `Boolean` | `true` | Creates intermediate directories for destination files. |
+| **mount** | `String` | | Prefix trimmed off request path before matching/processing. |
+| **delta** | `Number` | `0` | Delta `mtime` (in seconds) required for a derived file to be considered stale, and therefore recompiled. By default, any change will cause a file to be recompiled on next request. |
+| **expires** | `Boolean` | `false` | Automatically treat files as stale if this old in secs. |
+| **external_timeout** | `Number` | `3000` | Milliseconds after which to kill subprocess commands. |
+| **cascade** | `Boolean` | `false` | Invoke all compilers that match? otherwise, only first. |
+| **resolve_index** | `Boolean` , `String` | `false` | If `true`-y, directories are resolved with the supplied filename, where `true` maps to `'index.html'`. |
+| **ignore** | `RegExp` | `/\.(jpe?g!gif!png)$/i` | Requests matching this pattern are short-circuit ignored, and no compiler matching occurs. |
+| **allowed_methods** | `String[]` | `['GET']` | HTTP methods compiler should process. This setting is global-only -- per-compiler overrides specified via `options` will have no effect. |
+| **options** | `{compilerId:settings, ...}` | | Hash of additional per-compiler options, mapped by compiler id. Each compiler is supplied a copy of the `settings` object; if additional options are supplied in this way for a given compiler, they will be merged into the settings (and override any colliding top-level keys). |
## Compilers
Please sign in to comment.
Something went wrong with that request. Please try again.