Coder Social home page Coder Social logo

Feature: support --inspect flags about npx HOT 5 CLOSED

zkat avatar zkat commented on August 15, 2024 7
Feature: support --inspect flags

from npx.

Comments (5)

zkat avatar zkat commented on August 15, 2024 5

This is available in [email protected].

from npx.

zkat avatar zkat commented on August 15, 2024

@paulirish tapjs/tapjs#160 (comment) would mirroring this behavior be of enough use to you? It'd be nice to make sure there's a more general way of passing opts down to node. This would also only apply to actual execution operations, not when npx is internally doing npm operations.

from npx.

paulirish avatar paulirish commented on August 15, 2024

so you're saying an API like this:

npx --node-arg=--inspect-brk eslint .

that's not as ideal but i guess it works. Though at that point i already have to freehand type such a long command, i'd rather just start with node --inspect-brk and then go back to tab completing the node_modules path. :/

so if you prefer that direction then i'll probably release a mini npx-inspect module that wraps around it for ease of use.

from npx.

zkat avatar zkat commented on August 15, 2024

@paulirish I spent some more time thinking about this and I really like the idea of just having a wrapper that hides the verbosity. This is the sort of thing that stuff like that or aliases are good for.

Plus, it means you can do $ npx npx-inspect eslint . 😂

There's one caveat to all this: If I add this option, I'm going to have to make npx crash out if it can't detect that the target is a node script. in general, this should be fine, but npx's detection of shebangs isn't really perfect right now. I imagine you're ok with an 80% solution and then we can fine-tune if/when running into stuff where npx can't tell if it's node.

from npx.

zkat avatar zkat commented on August 15, 2024

I've prototyped this over at #77.

from npx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.