1
- ** The less-middleware has recently been updated to version ` 1.0.4 ` .**
2
-
3
- ** If you are seeing an error similar to ` TypeError: Arguments to path.join must be strings ` please read the [ migration guide] ( https://github.com/emberfeather/less.js-middleware/wiki/Migration-0.1.x-1.0.x ) to update your code.**
4
-
5
1
This middleware was created to allow processing of [ Less] ( http://lesscss.org ) files for [ Connect JS] ( http://www.senchalabs.org/connect/ ) framework and by extension the [ Express JS] ( http://expressjs.com/ ) framework.
6
2
7
3
[ ![ Build Status] ( https://drone.io/github.com/emberfeather/less.js-middleware/status.png )] ( https://drone.io/github.com/emberfeather/less.js-middleware/latest )
@@ -41,11 +37,6 @@ The following options can be used to control the behavior of the middleware:
41
37
</tr>
42
38
</thead>
43
39
<tbody>
44
- <tr>
45
- <th><code>compiler</code></th>
46
- <td>Options for the less compiler. See the "<code>compiler</code> Options" section below.</td>
47
- <td>…</td>
48
- </tr>
49
40
<tr>
50
41
<th><code>debug</code></th>
51
42
<td>Show more verbose logging?</td>
@@ -66,11 +57,6 @@ The following options can be used to control the behavior of the middleware:
66
57
<td>Only recompile once after each server restart. Useful for reducing disk i/o on production.</td>
67
58
<td><code>false</code></td>
68
59
</tr>
69
- <tr>
70
- <th><code>parser</code></th>
71
- <td>Options for the less parser. See the "<code>parser</code> Options" section below.</td>
72
- <td>…</td>
73
- </tr>
74
60
<tr>
75
61
<th><code>pathRoot</code></th>
76
62
<td>Common root of the source and destination. It is prepended to both the source and destination before being used.</td>
@@ -101,6 +87,11 @@ The following options can be used to control the behavior of the middleware:
101
87
<td>Function that modifies the less pathname before being loaded from the filesystem.</td>
102
88
<td><code>function(pathname, req){...}</code></td>
103
89
</tr>
90
+ <tr>
91
+ <th><code>render</code></th>
92
+ <td>Options for the less render. See the "<code>render</code> Options" section below.</td>
93
+ <td>…</td>
94
+ </tr>
104
95
<tr>
105
96
<th><code>storeCss</code></th>
106
97
<td>Function that is in charge of storing the css in the filesystem.</td>
@@ -114,9 +105,9 @@ The following options can be used to control the behavior of the middleware:
114
105
</tbody>
115
106
</table >
116
107
117
- ## ` compiler ` Options
108
+ ## ` render ` Options
118
109
119
- The ` options.compiler ` is passed directly into the less parser with minimal defaults or changes by the middleware.
110
+ The ` options.render ` is passed directly into the ` less.render ` with minimal defaults or changes by the middleware.
120
111
121
112
The following are the defaults used by the middleware:
122
113
@@ -132,50 +123,13 @@ The following are the defaults used by the middleware:
132
123
<th><code>compress</code></th>
133
124
<td><code>auto</code></td>
134
125
</tr>
135
- <tr>
136
- <th><code>sourceMap</code></th>
137
- <td><code>false</code></td>
138
- </tr>
139
126
<tr>
140
127
<th><code>yuicompress</code></th>
141
128
<td><code>false</code></td>
142
129
</tr>
143
130
</tbody>
144
131
</table >
145
132
146
- ## ` parser ` Options
147
-
148
- The ` options.parser ` is passed directly into the less parser with minimal defaults or changes by the middleware.
149
-
150
- The following are the defaults used by the middleware:
151
-
152
- <table >
153
- <thead>
154
- <tr>
155
- <th>Option</th>
156
- <th>Default</th>
157
- </tr>
158
- </thead>
159
- <tbody>
160
- <tr>
161
- <th><code>dumpLineNumbers</code></th>
162
- <td><code>0</code></td>
163
- </tr>
164
- <tr>
165
- <th><code>paths</code></th>
166
- <td><code>[source]</code></td>
167
- </tr>
168
- <tr>
169
- <th><code>optimization</code></th>
170
- <td><code>0</code></td>
171
- </tr>
172
- <tr>
173
- <th><code>relativeUrls</code></th>
174
- <td><code>false</code></td>
175
- </tr>
176
- </tbody>
177
- </table >
178
-
179
133
## Examples
180
134
181
135
Common examples of using the Less middleware are available in the [ wiki] ( https://github.com/emberfeather/less.js-middleware/wiki/Examples ) .
0 commit comments