npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

gist-viewer-vue

v1.2.1

Published

A simple Vue component to render GitHub Gist content by URL.

Readme

📦 Gist Viewer Vue

NPM Version
Easily embed and display GitHub Gists in your Vue applications with syntax highlighting, line numbers, and a responsive design.

🚀 Features

  • Responsive Design: Each file is scrollable horizontally for better readability.
  • Syntax Highlighting: Beautiful syntax highlighting for all major programming languages.
  • Line Numbers: Displays line numbers alongside your Gist content.
  • Customizable: Built with Tailwind CSS, easy to style and customize.
  • TypeScript Support: Fully typed and compatible with TypeScript.

📥 Installation

Install the package via npm or yarn:

npm install gist-viewer-vue

or

yarn add gist-viewer-vue

🛠️ Usage

1. Global Registration

Register the package globally in your main.ts or main.js file:

import { createApp } from "vue";
import App from "./App.vue";
import GistViewer from "gist-viewer-vue";

const app = createApp(App);

app.use(GistViewer); // Registers the plugin globally
app.mount("#app");

You can now use the <GistViewer> component anywhere in your app.

2. Local Registration

To use it in a specific component, import it locally:

<script setup lang="ts">
import GistViewer from "gist-viewer-vue";
</script>

<template>
  <GistViewer gistUrl="https://gist.github.com/your-username/your-gist-id" />
</template>

⚙️ Props

| Props | Type | Required | Default | Description | | ------- | ------ | ----------- | -------- | ------- | | gistUrl | string | ✅ | null | The URL of the GitHub Gist you want to display.

📚 Example

Here's an example of using the GistViewer component:

<template>
  <div>
    <h1>My GitHub Gist</h1>
    <GistViewer gistUrl="https://gist.github.com/your-username/your-gist-id" />
  </div>
</template>

<script setup lang="ts">
import GistViewer from "gist-viewer-vue";
</script>

🎨 Customization

Using Tailwind CSS

This package uses Tailwind CSS for styling. You can customize the styles by modifying your Tailwind configuration or overriding the default styles.

🧪 Development & Contribution

We welcome contributions! Follow these steps to set up the package locally:

  • Clone the repository:
    git clone https://github.com/darshitdudhaiya/gist-viewer-vue.git
  • Install dependencies:
    npm install
  • Run the development server:
    npm run dev

🤝 Contributing

We love contributions from the community! To contribute to this project, follow these guidelines:

Steps to Contribute

  1. Fork the Repository: Click the "Fork" button on the repository page.

  2. Clone Your Fork: Clone the repository to your local machine:

    git clone https://github.com/your-username/gist-viewer-vue.git
  3. Create a Branch: Create a new branch for your feature or fix:

    git checkout -b my-feature-branch
  4. Make Changes: Implement your changes in the codebase.

  5. Commit Changes: Commit your changes with a clear and concise message

    git commit -m "Add feature: XYZ"
  6. Push Changes: Push your branch to your fork:

    git push origin my-feature-branch
  7. Submit a Pull Request: Go to the original repository and open a Pull Request. Provide details about the changes you made.

Guidelines

  • Ensure your code follows the project's style and conventions.
  • Write clear commit messages.
  • Add tests if you’re introducing new functionality.
  • Make sure your changes don’t break existing features.
  • Update documentation if necessary.

📝 License

This project is licensed under the MIT License.

👤 Author

Darshit Dudhaiya
Made with ❤️ by Darshit Dudhaiya. Follow me on LinkedIn.