Lloyd Brookes
9 years ago
7 changed files with 94 additions and 68 deletions
-
2bin/cli.js
-
4example/rewrite/.local-web-server.json
-
26example/rewrite/index.html
-
7example/rewrite/styles/style.css
-
6jsdoc2md/README.hbs
-
108lib/local-web-server.js
-
1package.json
@ -1,5 +1,7 @@ |
|||
{ |
|||
"rewrite": [ |
|||
{ "from": "/css/*", "to": "/styles/$1" } |
|||
{ "from": "/css/*", "to": "/styles/$1" }, |
|||
{ "from": "/npm/*", "to": "http://registry.npmjs.org/$1" }, |
|||
{ "from": "/gh/:user/repo/:name", "to": "https://api.github.com/repos/:user/:name" } |
|||
] |
|||
} |
@ -1,10 +1,22 @@ |
|||
<head> |
|||
<link rel="stylesheet" href="css/style.css"> |
|||
</head> |
|||
<h1>Amazing Page</h1> |
|||
<p> |
|||
With a freaky triangle.. |
|||
</p> |
|||
<svg width="500" height="500"> |
|||
<polygon points="250,0 0,500 500,500"></polygon> |
|||
</svg> |
|||
<h1>Rewriting paths</h1> |
|||
|
|||
<h2>Config</h2> |
|||
<pre><code> |
|||
{ |
|||
"rewrite": [ |
|||
{ "from": "/css/*", "to": "/styles/$1" }, |
|||
{ "from": "/npm/*", "to": "http://registry.npmjs.org/$1" }, |
|||
{ "from": "/gh/:user/repo/:name", "to": "https://api.github.com/repos/:user/:name" } |
|||
] |
|||
} |
|||
</code></pre> |
|||
|
|||
<h2>Links</h2> |
|||
<ul> |
|||
<li><a href="/css/style.css">/css/style.css</li> |
|||
<li><a href="/npm/local-web-server">/npm/local-web-server</a></li> |
|||
<li><a href="/gh/75lb/repo/work">/gh/75lb/repo/work</a></li> |
|||
</ul> |
@ -1,7 +1,4 @@ |
|||
body { |
|||
background-color: #AA3939; |
|||
color: #FFE2E2 |
|||
} |
|||
svg { |
|||
fill: #000 |
|||
font-family: monospace; |
|||
font-size: 1.3em; |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue