dmnd / dedent

⬅️ ES6 string tag that strips indentation from multi-line strings.
MIT License
931 stars 36 forks source link

📝 Docs: add an 'install' section to the README? #83

Closed jclaveau closed 11 months ago

jclaveau commented 11 months ago

Bug Report Checklist

Expected

Actual

I installed dedent with pnpm install dmnd/dedent

Then Typescript can't find the declaration but at runtime (Vite devServer) my strings are dedented: image

Also trying to auto-import it with https://github.com/unplugin/unplugin-auto-import configured with

              'dedent': [
                [`default`, `dedent`],
              ],

I get image

Additional Info

github-actions[bot] commented 11 months ago

Uh oh! @jclaveau, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

github-actions[bot] commented 11 months ago

Uh oh! @jclaveau, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

JoshuaKGoldberg commented 11 months ago

Whew, got me scared with this title 😄 but this is really a docs request. I don't recall ever seeing an issue reported on the github:... syntax. It feels to me that if a project is going to link to a repository in that way, it should really be willing to work with details of how the tooling works (read: this is a userland issue, not a dedent issue). That tooling is -to my understanding- mostly meant for developers to be able to try something locally or pin to a specific in-development / unpublished version of the repository.

Furthermore, if you're going to link to a repository, you should really pin to a specific commit. Linking to "github:..." is the equivalent of "*" for the version number. No guarantees your builds won't suddenly start failing from a breaking change upon a coincidental lockfile update.

...all that being said, most of my other repos have an explicit install command in their readme. I can add one in here. Thanks for the suggestion!

jclaveau commented 11 months ago

I didn't expect dedent to be added with a github:... url when I ran pnpm install dmnd/dedent, I just noticed it afterwards (including the absence of commit).

Thank you for your time!

github-actions[bot] commented 7 months ago

:tada: This is included in version v1.5.2 :tada:

The release is available on:

Cheers! 📦🚀