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

@txukyt/j38-lib

v1.1.11

Published

Librería compartida de utilidades para proyectos web del Ayuntamiento de Vitoria-Gasteiz

Downloads

137

Readme

j38-lib

npm version

Librería compartida de utilidades JavaScript para los proyectos web del Ayuntamiento de Vitoria-Gasteiz.

Diseñada como un conjunto modular reutilizable, con soporte para ES Modules, Rollup, despliegue por entornos y versionado automático desde package.json.

🚀 Instalación

Desde npm (cuando esté publicada):

npm install @txukyt/j38-lib

Desde GitHub directamente:

npm install github:txukyt/j38-lib

🧩 Uso

En un entorno JavaScript moderno (ESM):

import { hello, showVersion } from '@txukyt/j38-lib';

hello('Ane'); // Hola, Ane
showVersion(); // Inicializando la libreria j38-lib de J38 con la versión: ${version}

En entorno HTML/WordPress:

<script src="/http/comun/mjs/j38-lib.iife.js"></script>
<script>
  VGLib.hello('Igor');
  VGLib.showVersion();
</script>

🛠️ Desarrollo

Clona el repositorio:

git clone https://github.com/txukyt/j38-lib.git
cd j38-lib
npm install

Construir la librería:

npm run build

Genera:

  • dist/j38-lib.iife.js → para navegadores
  • dist/dev/dev.js → para navegadores
  • dist/esm/index.js → para uso con import

⚙️ Despliegue automático por entorno

Usamos archivos .env para definir rutas por entorno:

# .env.dev
DEPLOY_PATH=D:/DEV-WAS8/website/serverX/http/comun/libs/vg

Ejecutar despliegue:

npm run deploy:dev
npm run deploy:desa
npm run deploy:pre
npm run deploy:prod

Esto:

  • Compila la librería
  • Copia los bundles a la ruta indicada en .env.[entorno]

📁 Estructura del proyecto

j38-lib/
├── dist/                 # Archivos generados por Rollup
├── src/                  # Código fuente
│   ├── components/
│   └── index.js          # Punto de entrada
├── scripts/
│   └── deploy.js         # Script de despliegue
├── .env.dev              # Rutas por entorno
├── rollup.config.js      # Configuración de build
└── package.json

🔧 Alias configurados

  • @ apunta a src/
  • @pkg apunta a package.json (para importar la versión desde el código)

Ejemplo:

import pkg from '@pkg';
console.log(pkg.version);

✅ Requisitos

  • Node.js 18 o superior
  • npm 8+
  • Entornos preparados con rutas específicas de despliegue

📦 Publicación en npm

Cuando esté listo para publicar:

npm login
npm publish --access=public

📄 Licencia

MIT — © David Mora