Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add default destination configuration when ommited

See original GitHub issue

I’m using njt most of the time just to jump to the repository. And I have always to type

njt react g

Would be good to have some configuration in web, that you can set for example default destinatio to g and jsut write

njt react

Possible ways to implement it

  • manually set a default destination
  • jump to last used destination
  • use most used destination

ps: I might start a PR soon.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

iamandrewlucacommented, Sep 2, 2021

easy peasy lemon squeezy with a bookmarklet 😃
We can add this to pro tips, when someone wants to extend njt functionality 🙂

Put this in “Query URL” of the search engine

javascript: void ((function(query) {
  /* More bookmarklets at */
  const [packageName, destination = 'g'] = query.split(' ');
  window.location.href = `${packageName} ${destination}`;

ps: now I realise that search engine + bookmarklets open a new level of scripting in the browser you can implement the whole njt in a bookmarklet 😄

kachkaevcommented, Sep 2, 2021


Here’s one more thing we can do to the web UI in theory. Imagine that the query is persisted in the local storage, so when the page reloads, you see what you’ve typed in the last time. A single click on the input selects everything, but a double-click selects only a given word. So this scenario becomes possible:

Kapture 2021-09-02 at 12 18 39

Double-click does not work for multi-word package names like react-query or @types/react out of box, but it might be possible to override the default event handler to fix that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve the "Unable to validate the following destination ...
How do I avoid the "Unable to validate the following destination configurations" error with Lambda event notifications in CloudFormation?
Read more >
Electronic reporting (ER) destinations - Finance & Operations
By default, configured destinations are applied only when you run an ER format version that has a status of either Completed or Shared....
Read more >
config | npm Docs
Run npm config ls -l to see a set of configuration parameters that are internal to npm, and are defaults if nothing else...
Read more >
Postfix Configuration Parameters
The default location of the Postfix and configuration files. ... the domain name in $myorigin or $mydomain, and adding missing headers....
Read more >
Pitfalls and Common Mistakes | NGINX
This page outlines some of the NGINX configuration issues that we see ... server { server_name; location / { root /var/www/nginx-default/; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found