denoland / dotland

[Archived] deno.land website
https://deno.land
MIT License
957 stars 626 forks source link

Variables in the README.md if a module #2494

Closed kitsonk closed 1 year ago

kitsonk commented 2 years ago

Discussed in https://github.com/denoland/deno/discussions/15961

Originally posted by **justinmchase** September 20, 2022 In most / all readme's there is usually a little usage example to get someone started. It will usually start with a line that shows how to import the current module. That import statement usually should have a version number in it. Trying to keep that version number up to date with the actual latest version tag isn't super hard but it does require a little automation, or dilligence, or both. What would be nice is if deno.land/x recognized, at least, the $GIT_TAG variable and just did a straight replacement, so if I had some snippet in my readme such as: like: ````ts ```ts import { example } from "https://deno.land/x/example@$GIT_TAG/mod.ts"; ``` ```` Then it would render like this, when viewed relative to the tag named `0.1.0` in the deno land third party module UI. ```ts import { example } from "https://deno.land/x/example@0.1.0/mod.ts"; ```