From 724b7f05aa6702734324d2b733eade3d5facf9c7 Mon Sep 17 00:00:00 2001 From: James Wright Date: Wed, 20 Nov 2019 13:21:15 +0000 Subject: [PATCH] Moves current README to template so version numbers are injectable --- README.md => README.template.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename README.md => README.template.md (94%) diff --git a/README.md b/README.template.md similarity index 94% rename from README.md rename to README.template.md index ebd47d6..fc90c72 100644 --- a/README.md +++ b/README.template.md @@ -12,7 +12,7 @@ import { textResponse, jsonResponse, streamResponse, -} from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.1/reno/mod.ts"; +} from "https://raw.githubusercontent.com/jamesseanwright/reno/{{version}}/reno/mod.ts"; export const routes = createRouteMap([ ["/home", () => textResponse("Hello world!")], @@ -52,7 +52,7 @@ const router = createRouter(routes); This, along with request handlers being [pure functions](https://en.wikipedia.org/wiki/Pure_function), makes unit testing Reno services a breeze: ```ts -import { jsonResponse, assertResponsesMatch } from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.1/reno/mod.ts"; +import { jsonResponse, assertResponsesMatch } from "https://raw.githubusercontent.com/jamesseanwright/reno/{{version}}/reno/mod.ts"; import { createRonSwansonQuoteHandler } from './routes.ts'; const createFetchStub = (response: string[]) => @@ -85,7 +85,7 @@ test({ Deno emulates the middleware pattern, [found in Express](https://expressjs.com/en/guide/using-middleware.html), favouring [function piping](https://www.sitepoint.com/function-composition-in-javascript/#theimportanceofinvocationorder) to create reusable, higher-order route handlers: ```ts -import { createRouteMap, jsonResponse, pipe } from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.1/reno/mod.ts"; +import { createRouteMap, jsonResponse, pipe } from "https://raw.githubusercontent.com/jamesseanwright/reno/{{version}}/reno/mod.ts"; const withCaching = pipe( (req, res) => {