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

@bodystyle/show-code

v2.0.0

Published

Librería para resaltar el código fuente

Readme


:book: Acerca de Show Code

Show Code es una biblioteca JavaScript liviana y eficiente para resaltar sintaxis de código en páginas web. Es una dependencia de BodyStyle, diseñada para proporcionar funcionalidades de resaltado de código de manera simple y elegante.

Lenguajes Soportados

  • :white_check_mark: JavaScript
  • :white_check_mark: Java
  • :white_check_mark: C
  • :white_check_mark: CSS
  • :white_check_mark: HTML

Características

  • :zap: Biblioteca liviana - Bundle de solo 20KB
  • :sparkles: Fácil de integrar - Sin configuración compleja
  • :art: Temas personalizables - Tema oscuro y claro incluidos
  • :rocket: Vanilla JavaScript - Sin dependencias externas
  • :package: Múltiples formatos - Disponible vía npm y CDN

:rocket: Inicio Rápido

La forma más rápida de usar Show Code es mediante CDN:

<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Tema oscuro -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/FedeManzano/show-code@main/dist/css/tema-oscuro.css">
    <title>Show Code Demo</title>
</head>
<body>
    <pre class="cod-js">
        // Código JavaScript
        console.log("¡Hola Mundo!");
    </pre>

    <script src="https://cdn.jsdelivr.net/gh/FedeManzano/show-code@main/dist/js/sintax.js"></script>
    <script>
        Show.ShowJsInit()
    </script>
</body>
</html>

:package: Instalación

Via npm

npm install show-code

Via CDN

<!-- CSS - Tema Oscuro -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/FedeManzano/show-code@main/dist/css/tema-oscuro.css">

<!-- CSS - Tema Claro -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/FedeManzano/show-code@main/dist/css/tema-claro.css">

<!-- JavaScript -->
<script src="https://cdn.jsdelivr.net/gh/FedeManzano/show-code@main/dist/js/sintax.js"></script>

Descarga Manual

Descarga los archivos desde el repositorio de GitHub y copia los archivos de la carpeta dist a tu proyecto.


:wrench: Uso

1. Incluir los archivos necesarios

<link rel="stylesheet" href="ruta/a/tema-oscuro.css">
<script src="ruta/a/sintax.js"></script>

2. Agregar el código HTML

Usa la etiqueta <pre> con la clase correspondiente al lenguaje:

<!-- JavaScript -->
<pre class="cod-js">
    const mensaje = "Hola Mundo";
    console.log(mensaje);
</pre>

<!-- Java -->
<pre class="cod-java">
    public class Main {
        public static void main(String[] args) {
            System.out.println("Hola Mundo");
        }
    }
</pre>

<!-- HTML -->
<pre class="cod-html">
    <div class="container">
        <h1>Título</h1>
        <p>Párrafo de ejemplo</p>
    </div>
</pre>

<!-- CSS -->
<pre class="cod-css">
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
    }
</pre>

<!-- C -->
<pre class="cod-c">
    #include <stdio.h>
    
    int main() {
        printf("Hola Mundo\n");
        return 0;
    }
</pre>

3. Inicializar Show Code

<script>
    // Inicializar todos los lenguajes
    Show.ShowJavaInit()
    Show.ShowJsInit()
    Show.ShowHtmlInit()
    Show.ShowCssInit()
    Show.ShowCInit()
</script>

O inicializa solo los lenguajes que necesites:

<script>
    // Solo JavaScript
    Show.ShowJsInit()
</script>

:art: Temas

Show Code incluye dos temas predefinidos:

Tema Oscuro

<link rel="stylesheet" href="dist/css/tema-oscuro.css">

Tema Claro

<link rel="stylesheet" href="dist/css/tema-claro.css">

:hammer_and_wrench: Desarrollo

Requisitos

  • Node.js >= 14
  • npm >= 6

Instalación de dependencias

npm install

Scripts disponibles

# Modo desarrollo
npm run dev

# Build de producción
npm run build

:handshake: Contribuir

Las contribuciones son bienvenidas. Si deseas contribuir:

  1. Fork el proyecto
  2. Crea una rama para tu feature (git checkout -b feature/AmazingFeature)
  3. Commit tus cambios (git commit -m 'Add some AmazingFeature')
  4. Push a la rama (git push origin feature/AmazingFeature)
  5. Abre un Pull Request

:page_facing_up: Licencia

Este proyecto está bajo la Licencia MIT. Ver el archivo LICENSE para más detalles.


:bust_in_silhouette: Autor

Federico Manzano


:link: Proyectos Relacionados

  • BodyStyle - Biblioteca CSS para desarrollo Front-End