Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
[changed] DevServer api to better reflect the api of the underlying…
Browse files Browse the repository at this point in the history
… `WebpackDevServer`; sass compilation is now optional
  • Loading branch information
thealjey committed Jul 13, 2016
1 parent 172aaab commit 1b9ea9f
Show file tree
Hide file tree
Showing 13 changed files with 851 additions and 542 deletions.
138 changes: 13 additions & 125 deletions docs/DevServer.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ <h2>

<hr>
<dt>
<h4 class="name" id="DevServer"><span class="type-signature"></span>new DevServer(script, style, devDir [, port] [, react])</h4>
<h4 class="name" id="DevServer"><span class="type-signature"></span>new DevServer(script [, options])</h4>


</dt>
Expand Down Expand Up @@ -183,125 +183,13 @@ <h5>Parameters:</h5>

<tr>

<td class="name"><code>style</code></td>
<td class="name"><code>options</code></td>


<td class="type">


<span class="param-type">string</span>




</td>


<td class="attributes">





</td>



<td class="default">

</td>


<td class="description last"><p>a full system path to a SASS file</p></td>
</tr>



<tr>

<td class="name"><code>devDir</code></td>


<td class="type">


<span class="param-type">string</span>




</td>


<td class="attributes">





</td>



<td class="default">

</td>


<td class="description last"><p>a full system path to a directory in which to put any compiled development resources</p></td>
</tr>



<tr>

<td class="name"><code>port</code></td>


<td class="type">


<span class="param-type">number</span>




</td>


<td class="attributes">

&lt;optional><br>





</td>



<td class="default">

3000

</td>


<td class="description last"><p>a port at which to start the dev server</p></td>
</tr>



<tr>

<td class="name"><code>react</code></td>


<td class="type">


<span class="param-type">boolean</span>
<span class="param-type"><a href="global.html#DevServerConfig">DevServerConfig</a></span>



Expand All @@ -323,12 +211,12 @@ <h5>Parameters:</h5>

<td class="default">

true
{}

</td>


<td class="description last"><p>false to disable the react hot loader plugin</p></td>
<td class="description last"><p>optional configuration</p></td>
</tr>


Expand Down Expand Up @@ -373,7 +261,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="DevServer.js.html">DevServer.js</a>,
<a href="DevServer.js.html#sunlight-1-line-14">line 14</a>
<a href="DevServer.js.html#sunlight-1-line-21">line 21</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -417,11 +305,11 @@ <h5>Example</h5>
// or - var DevServer = require(&#x27;webcompiler/lib/DevServer&#x27;).DevServer;
import {join} from &#x27;path&#x27;;

const rootDir = join(__dirname, &#x27;..&#x27;),
devDir = join(rootDir, &#x27;development&#x27;),
server = new DevServer(join(devDir, &#x27;script.js&#x27;), join(devDir, &#x27;app.scss&#x27;), devDir);
const devDir = join(__dirname, &#x27;..&#x27;, &#x27;development&#x27;),
script = join(devDir, &#x27;script.js&#x27;),
style = join(devDir, &#x27;app.scss&#x27;);

server.run(rootDir);
new DevServer(script, {style}).run();
// now navigate to http://localhost:3000 using your favorite browser ( preferably Chrome :) )</pre>


Expand Down Expand Up @@ -505,7 +393,7 @@ <h4 class="name" id="run"><span class="type-signature"></span>run()</h4>
<ul class="dummy">
<li>
<a href="DevServer.js.html">DevServer.js</a>,
<a href="DevServer.js.html#sunlight-1-line-191">line 191</a>
<a href="DevServer.js.html#sunlight-1-line-211">line 211</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -599,7 +487,7 @@ <h4 class="name" id="watchJS"><span class="type-signature"></span>watchJS()</h4>
<ul class="dummy">
<li>
<a href="DevServer.js.html">DevServer.js</a>,
<a href="DevServer.js.html#sunlight-1-line-171">line 171</a>
<a href="DevServer.js.html#sunlight-1-line-155">line 155</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -693,7 +581,7 @@ <h4 class="name" id="watchSASS"><span class="type-signature"></span>watchSASS()<
<ul class="dummy">
<li>
<a href="DevServer.js.html">DevServer.js</a>,
<a href="DevServer.js.html#sunlight-1-line-156">line 156</a>
<a href="DevServer.js.html#sunlight-1-line-128">line 128</a>
</li>
</ul>
</dd>
Expand Down
Loading

0 comments on commit 1b9ea9f

Please sign in to comment.