serve locally from root to be clearer

This commit is contained in:
Heydon Pickering 2017-07-27 17:24:17 +01:00
parent d96be1e072
commit 2aa170366a
6 changed files with 8 additions and 6 deletions

View File

@ -8,7 +8,7 @@ While you're creating content for your library, you'll probably want to see what
{{<cmd>}}npm run serve{{</cmd>}}
This will serve your working library from `localhost:1313` (the exact URL will be determined by what's in your `baseURL` and will be revealed to you by your terminal). Whenever you make changes to your library's files, the site will automatically rebuild. No need to refresh the web page!
This will serve your working library from `localhost:1313`. Whenever you make changes to your library's files, the site will automatically rebuild. No need to refresh the web page!
## Publishing on Github Pages

View File

@ -178,7 +178,8 @@ I can reference the &amp;#x7b;{% pattern &#34;Notes &amp; warnings&#34; %}} patt
<guid>https://heydon.github.io/infusion/patterns/serving/</guid>
<description>Serving locally While you&amp;rsquo;re creating content for your library, you&amp;rsquo;ll probably want to see what the finished product looks like. Fortunately, Infusion is easy to serve locally using the serve command:
npm run serve This will serve your working library from localhost:1313 (the exact URL will be determined by what&amp;rsquo;s in your baseURL and will be revealed to you by your terminal). Whenever you make changes to your library&amp;rsquo;s files, the site will automatically rebuild.</description>
npm run serve This will serve your working library from localhost:1313. Whenever you make changes to your library&amp;rsquo;s files, the site will automatically rebuild. No need to refresh the web page!
Publishing on Github Pages Infusion creates a /docs folder containing the latest version of your library whenever you do an npm run build or a git commit.</description>
</item>
<item>

View File

@ -39,7 +39,8 @@ brew install hugo Alternatively, you can manually install Hugo from a package. Y
<guid>https://heydon.github.io/infusion/patterns/serving/</guid>
<description>Serving locally While you&amp;rsquo;re creating content for your library, you&amp;rsquo;ll probably want to see what the finished product looks like. Fortunately, Infusion is easy to serve locally using the serve command:
npm run serve This will serve your working library from localhost:1313 (the exact URL will be determined by what&amp;rsquo;s in your baseURL and will be revealed to you by your terminal). Whenever you make changes to your library&amp;rsquo;s files, the site will automatically rebuild.</description>
npm run serve This will serve your working library from localhost:1313. Whenever you make changes to your library&amp;rsquo;s files, the site will automatically rebuild. No need to refresh the web page!
Publishing on Github Pages Infusion creates a /docs folder containing the latest version of your library whenever you do an npm run build or a git commit.</description>
</item>
</channel>

View File

@ -317,7 +317,7 @@
<pre class="cmd"><code>npm run serve</code></pre>
<p>This will serve your working library from <code>localhost:1313</code> (the exact URL will be determined by what&rsquo;s in your <code>baseURL</code> and will be revealed to you by your terminal). Whenever you make changes to your library&rsquo;s files, the site will automatically rebuild. No need to refresh the web page!</p>
<p>This will serve your working library from <code>localhost:1313</code>. Whenever you make changes to your library&rsquo;s files, the site will automatically rebuild. No need to refresh the web page!</p>
<h2 id="publishing-on-github-pages">Publishing on Github Pages</h2>

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"serve": "hugo server",
"serve": "hugo server --baseURL http://localhost:1313",
"clean": "rm -rf content && mkdir content && mkdir content/patterns && hugo new patterns/pattern.md && hugo new _index.md",
"build": "rm -rfv docs/* && hugo && sw-precache --root=docs && git add -A"
},