Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

277
Vistas
Is there a way to test an in-development NPM package via NPX?

I'm working on an NPM package that is intended for use solely via npx *, a la packages like create-nuxt-app.

Is there a way to test my package with npx *? In other words, run my bin script without installing the package.

I've read this discussion, which suggests perhaps there isn't. I realise I can test the installation, rather than mere running, of my a packge via something like Yalc, but Yalc provides only yalc add *, which simulates npm install *, not npx *.

What's the best approach here?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

After much digging and discussion it seems npm init * is identical to npx * provided the package name begins with create-. (Source).

So:

npx create-nuxt-app

is actually the same as

npm init nuxt-app

If your package doesn't begin with create- this won't work.

You can use either approach to pass args, if the package allows it.

This means you can use traditional NPM package testing mechanisms e.g. npm-link or something like Yalc, but test via npm * syntax rather than npx *.

over 4 years ago · Santiago Trujillo Denunciar

0

I mean why don’t you just publish yow code to npm. Change the version of it

{
“name”:”yowPackage”,
“version”:”0.0.1-dev”,
…
}

then you can test yow package

$ npx yowPackage@0.0.1-dev arguments

Then once yow code works publish the oficial version

{
“name”:”yowPackage”,
“version”:”1.0.0”,
…
}

$ npx yowPackage@1.0.0 arguments

Check this to learn more about it

https://docs.npmjs.com/adding-dist-tags-to-packages

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda