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

create-vue-stack

v1.0.3

Published

Mi generador de Proyectos

Downloads

25

Readme

🚀 create-vue-stack

Una herramienta CLI interactiva para generar un nuevo proyecto de Vue.js con un stack de desarrollo moderno y preconfigurado.

Este script te preguntará el nombre de tu proyecto y luego instalará y configurará automáticamente la base de tu aplicación, incluyendo todas las herramientas de desarrollo.


⚡ Uso

El script está publicado en npm, por lo que puedes ejecutarlo desde cualquier terminal (en cualquier PC que tenga Node.js) sin necesidad de instalar nada.

# El comando "npm create" añade el "create-" por ti.
npm create vue-stack

El script te guiará. Solo necesitas escribir el nombre de tu proyecto, y la herramienta hará el resto.


📦 ¿Qué incluye este Stack?

Este generador está diseñado para ser la base de un proyecto profesional y robusto. Al usarlo, tu proyecto quedará configurado con:

  • Vue.js 3: El framework progresivo.

  • Vite: El build tool de frontend nativo.

  • TypeScript: Para un código tipado y escalable.

  • Vue Router: Para el manejo de rutas (SPA).

  • Pinia: Para el manejo de estado global.

  • ESLint: Para el linting y la prevención de errores.

  • Prettier: Para el formateo de código automático.


🛠️ ¿Cómo funciona?

Este proyecto es un script de Node.js que usa @clack/prompts para la interfaz de terminal. El script principal (crear-proyecto.mjs) realiza las siguientes tareas automatizadas:

  1. Pregunta el nombre del proyecto de forma interactiva.

  2. Ejecuta npm create vue@latest con todos los flags predefinidos.

  3. Entra en la carpeta del proyecto y ejecuta npm install para instalar las dependencias.

  4. Corre npm run format para limpiar el código inicial.

  5. Abre VS Code en la nueva carpeta del proyecto.

  6. Abre una nueva ventana de terminal y ejecuta npm run dev por ti.

#!/usr/bin/env node
import * as p from "@clack/prompts";
import { execSync, spawn } from "child_process";
import color from "picocolors";
import path from "path";

async function main() {
  console.clear();
  p.intro(color.inverse(" 🚀 Asistente para crear tu Stack de Vue 🚀 "));

  const name = await p.text({
    message: "¿Cómo se llamará tu proyecto?",
    placeholder: "mi-proyecto-vue",
    validate(value) {
      if (value.length === 0) return "¡El nombre es obligatorio!";
      return value.includes(" ") ? "No uses espacios en el nombre." : undefined;
    },
  });

  if (p.isCancel(name)) {
    p.cancel("Operación cancelada.");
    return;
  }

  const flags = ["--ts", "--router", "--pinia", "--eslint", "--prettier"].join(
    " "
  );

  const s = p.spinner();
  const projectPath = path.resolve(name);

  try {
    s.start(`1. Creando el proyecto "${name}"...`);
    const command = `npm create vue@latest ${name} -- ${flags}`;
    execSync(command, { stdio: "inherit" });
    s.stop(`✅ Proyecto "${name}" creado.`);

    s.start("2. Instalando dependencias (npm install)...");
    execSync("npm install", { cwd: name, stdio: "inherit" });
    s.stop("✅ Dependencias instaladas.");

    s.start("3. Formateando código (npm run format)...");
    execSync("npm run format", { cwd: name, stdio: "inherit" });
    s.stop("✅ Código formateado.");

    s.start("4. Abriendo VS Code...");
    execSync("code .", { cwd: name });
    s.stop("✅ Editor abierto.");

    s.start("5. Iniciando servidor (npm run dev)...");

    if (process.platform === "win32") {
      const child = spawn(
        "cmd.exe",
        [
          "/c",
          "start",
          '""',
          "/D",
          projectPath,
          "cmd.exe",
          "/K",
          "npm run dev",
        ],
        {
          detached: true,
          stdio: "ignore",
        }
      );

      child.unref();
    } else if (process.platform === "darwin") {
      const macScript = `osascript -e 'tell app "Terminal" to do script "cd \\"${projectPath}\\" && npm run dev"'`;
      execSync(macScript);
    } else {
      const linuxScript = `gnome-terminal --working-directory="${projectPath}" -- /bin/sh -c "npm run dev; exec bash"`;
      execSync(linuxScript);
    }

    s.stop("✅ Servidor iniciado en una nueva ventana.");

    p.outro(
      color.green(
        `¡Todo listo! Tu proyecto está abierto y el servidor está corriendo.`
      )
    );
  } catch (e) {
    s.stop("❌ Error durante el proceso.");
    console.error(e.message);
    p.outro(color.red("Hubo un error. Revisa el log de la terminal arriba."));
  }
}

main();