Skip to content

Commit 7905405

Browse files
committed
1 parent 12109ef commit 7905405

File tree

7 files changed

+28
-28
lines changed

7 files changed

+28
-28
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<p align="center">
44
<b>🐸 npm jump to 🐸</b><br/>
5-
<a href="https://njt.now.sh">njt.now.sh</a>
5+
<a href="https://njt.vercel.app">njt.vercel.app</a>
66
</p>
77

88
Are you typing npm package names in your search engine to then manually navigate to their source, homepage, changelog, versions and so on? 🕐🕑🕒🕓🕔
@@ -93,11 +93,11 @@ Note that setting `BROWSER` instead of `NJT_BROWSER` can affect other tools, whi
9393
1. Click _Add_ next to _Other search engines_
9494
1. Fill in the _Add search engine_ form:
9595

96-
| Field | Value |
97-
| ----------------------------- | ------------------------------------------- |
98-
| Search engine | `njt (npm jump to)` |
99-
| Keyword | `njt` |
100-
| Url with %s in place of query | `https://njt.now.sh/jump?from=chrome&to=%s` |
96+
| Field | Value |
97+
| ----------------------------- | ----------------------------------------------- |
98+
| Search engine | `njt (npm jump to)` |
99+
| Keyword | `njt` |
100+
| Url with %s in place of query | `https://njt.vercel.app/jump?from=chrome&to=%s` |
101101

102102
1. Press _Add_
103103

@@ -113,7 +113,7 @@ The command to type in Chrome address bar will become `n <package> [destination]
113113

114114
You can use `njt` right from the address bar in Firefox.
115115

116-
1. Open [njt.now.sh](https://njt.now.sh)
116+
1. Open [njt.vercel.app](https://njt.vercel.app)
117117
1. Right-click on the search input field
118118
1. In the context menu, select _Add Keyword for this Search..._
119119
1. You’ll see a small form; type `njt` into the _Keyword_ field
@@ -135,19 +135,19 @@ Want to hop directly from [Alfred launcher](https://www.alfredapp.com/)?
135135
1. Click _Add Custom Search_
136136
1. Fill in the form:
137137

138-
| Field | Value |
139-
| ---------- | ------------------------------------------------ |
140-
| Search URL | `https://njt.now.sh/jump?from=alfred&to={query}` |
141-
| Title | `Search njt for '{query}'` |
142-
| Keyword | `njt` |
143-
| Icon | drag from <https://njt.now.sh/favicon-32x32.png> |
138+
| Field | Value |
139+
| ---------- | ---------------------------------------------------- |
140+
| Search URL | `https://njt.vercel.app/jump?from=alfred&to={query}` |
141+
| Title | `Search njt for '{query}'` |
142+
| Keyword | `njt` |
143+
| Icon | drag from <https://njt.vercel.app/favicon-32x32.png> |
144144

145145
1. Press _Save_
146146

147147
Alternatively, copy and open this special Alfred link to get all the above steps done for you:
148148

149149
```txt
150-
alfred://customsearch/Search%20njt%20for%20%27%7Bquery%7D%27/njt/utf8/nospace/https%3A%2F%2Fnjt.now.sh%2Fjump%3Ffrom%3Dalfred%26to%3D%7Bquery%7D
150+
alfred://customsearch/Search%20njt%20for%20%27%7Bquery%7D%27/njt/utf8/nospace/https%3A%2F%2Fnjt.vercel.app%2Fjump%3Ffrom%3Dalfred%26to%3D%7Bquery%7D
151151
```
152152

153153
**Pro tip 💡** You can use `n` instead of `njt` as a search keyword to avoid typing two extra characters each time.
@@ -181,11 +181,11 @@ This trick is possible thanks to DuckDuckGo’s awesome [bang feature](https://d
181181

182182
### 🟢 Online search field on the `njt`’s mini-website
183183

184-
Open [njt.now.sh](https://njt.now.sh), type your query, press Enter.
184+
Open [njt.vercel.app](https://njt.vercel.app), type your query, press Enter.
185185
This method is a bit slower than the other ones because it involves opening a web page with an input form.
186186
On the plus side, it works everywhere and does not require setup.
187187

188-
Thanks to [now.sh](https://now.sh) for hosting [njt.now.sh](https://njt.now.sh) 💚
188+
Thanks to [Vercel](https://vercel.com) for hosting [njt.vercel.app](https://njt.vercel.app) 💚
189189

190190
### ❓More ways
191191

@@ -199,7 +199,7 @@ For requests like `njt <package>` or `njt <package> y`, all the tool does is nav
199199
Most other cases involve a look into `package.json` for the latest published version.
200200
This file contains the location of the repository, the homepage and some other fields, which `njt` uses to construct the destination URL.
201201

202-
The command line version of the tool takes you to `https://njt.now.sh/jump?from=cli@VERSION&to=YOUR_QUERY`, from which you are redirected to the destination.
202+
The command line version of the tool takes you to `https://njt.vercel.app/jump?from=cli@VERSION&to=YOUR_QUERY`, from which you are redirected to the destination.
203203

204204
## Prior art
205205

cli/cli.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ program
1818
`🐸 ✨ 🐸 ✨ 🐸
1919
npm jump to: a quick navigation tool for npm packages
2020
21-
https://njt.now.sh
21+
https://njt.vercel.app
2222
2323
${ /* When updating, remember to reflect changes in README.md and src/ui/PageContentsForIndex/AvailableDestinations.tsx */''}
2424
Available destinations
@@ -82,7 +82,7 @@ ${chalk.red(
8282
)}
8383
Change directly or replace . with a package name.
8484
85-
🐸 https://njt.now.sh
85+
🐸 https://njt.vercel.app
8686
`);
8787
process.exit(1);
8888
}
@@ -96,7 +96,7 @@ ${chalk.red(
9696
)}
9797
Change directly or replace . with a package name.
9898
99-
🐸 https://njt.now.sh
99+
🐸 https://njt.vercel.app
100100
`);
101101
process.exit(1);
102102
}

cli/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const getPackageVersion = () =>
55
require(path.resolve(__dirname, "./package.json")).version;
66

77
const generateUrl = (query) => {
8-
return `https://njt.now.sh/jump?from=cli%40${getPackageVersion()}&to=${encodeURIComponent(
8+
return `https://njt.vercel.app/jump?from=cli%40${getPackageVersion()}&to=${encodeURIComponent(
99
query,
1010
)}`;
1111
};

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"productivity",
1111
"shortcut"
1212
],
13-
"homepage": "https://njt.now.sh",
13+
"homepage": "https://njt.vercel.app",
1414
"bugs": "https://github.com/kachkaev/njt/issues",
1515
"repository": {
1616
"type": "git",

public/opensearch.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
33
<ShortName>njt</ShortName>
44
<Description>npm jump to</Description>
5-
<Image width="32" height="32" type="image/png">https://njt.now.sh/favicon-32x32.png</Image>
5+
<Image width="32" height="32" type="image/png">https://njt.vercel.app/favicon-32x32.png</Image>
66
<Tags>njt</Tags>
7-
<Url type="text/html" template="https://njt.now.sh/jump?to={searchTerms}"/>
8-
<Url type="application/opensearchdescription+xml" rel="self" template="https://njt.now.sh/opensearch.xml" />
9-
<moz:SearchForm>https://njt.now.sh</moz:SearchForm>
7+
<Url type="text/html" template="https://njt.vercel.app/jump?to={searchTerms}"/>
8+
<Url type="application/opensearchdescription+xml" rel="self" template="https://njt.vercel.app/opensearch.xml" />
9+
<moz:SearchForm>https://njt.vercel.app</moz:SearchForm>
1010
</OpenSearchDescription>

src/ui/PageContentsForIndex/PageContentsForIndex.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const PageContentsForIndex: React.FunctionComponent = () => {
155155
</ExternalLink>{" "}
156156
using <ExternalLink href="https://nextjs.org">Next.js</ExternalLink>,
157157
hosted&nbsp;by&nbsp;
158-
<ExternalLink href="https://now.sh" />
158+
<ExternalLink href="https://vercel.com">Vercel</ExternalLink>
159159
&nbsp;💚
160160
</p>
161161
</>

src/ui/PageMetadata.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as React from "react";
33

44
const getBaseUrl = () => {
55
const hostname =
6-
process.env.VERCEL_URL ?? process.env.HOSTNAME ?? "njt.now.sh";
6+
process.env.VERCEL_URL ?? process.env.HOSTNAME ?? "njt.vercel.app";
77
const protocol = hostname.split(":")[0] === "localhost" ? "http" : "https";
88

99
return `${protocol}://${hostname}`;

0 commit comments

Comments
 (0)