安装与配置方法
- 先在 Mac 上安装并打开 Glanceway,再使用上方的安装链接。
- 点击“安装到 Glanceway”。如果浏览器无法唤起应用,下载 .gwsrc 文件并在信息源管理中导入。
- 填写下列必填字段并保存,设置刷新间隔,等待首次成功获取。
配置检查
KEYWORD— 可选. Search keyword, e.g. typescript, react, cli, ai
没有显示内容时如何排查
- 对照当前版本配置表核对字段、列表项和凭据。下方示例不包含可用的真实凭据。
- 检查网络与上游服务状态。认证失败或速率限制可能导致刷新失败,应根据上游限制调整间隔。
- 空列表也可能表示没有符合条件的条目。内容和更新时间取决于数据提供方及信息源实现。
配置项
| 名称 | 键 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|---|
| Keyword | KEYWORD | string | 否 | typescript | Search keyword, e.g. typescript, react, cli, ai |
源代码
id: codytseng/npm-trending
version: 1.0.0
name: npm Trending
description: Popular and trending packages on npm
author: codytseng
author_url: https://github.com/codytseng
category: Developer
tags:
- npm
- packages
- javascript
config:
- key: KEYWORD
name: Keyword
type: string
required: false
default: typescript
description: "Search keyword, e.g. typescript, react, cli, ai" id: codytseng/npm-trending
version: 1.0.0
name: npm Trending
description: Popular and trending packages on npm
author: codytseng
author_url: https://github.com/codytseng
category: Developer
tags:
- npm
- packages
- javascript
config:
- key: KEYWORD
name: Keyword
type: string
required: false
default: typescript
description: "Search keyword, e.g. typescript, react, cli, ai" module.exports = async (api) => {
const keyword = api.config.get("KEYWORD") || "typescript";
async function fetchData() {
const res = await api.fetch(
`https://registry.npmjs.org/-/v1/search?text=${encodeURIComponent(keyword)}&popularity=1.0&quality=0.5&maintenance=0.0&size=250`,
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch npm search results (HTTP ${res.status})`);
}
api.emit(
res.json.objects.map((obj) => {
const pkg = obj.package;
const author = pkg.publisher?.username
? ` · by ${pkg.publisher.username}`
: "";
return {
id: pkg.name,
title: `${pkg.name}@${pkg.version}`,
subtitle: `${pkg.description || ""}${author}`,
url: pkg.links.npm,
timestamp: pkg.date,
};
}),
);
}
await fetchData();
return {
refresh: fetchData,
};
}; module.exports = async (api) => {
const keyword = api.config.get("KEYWORD") || "typescript";
async function fetchData() {
const res = await api.fetch(
`https://registry.npmjs.org/-/v1/search?text=${encodeURIComponent(keyword)}&popularity=1.0&quality=0.5&maintenance=0.0&size=250`,
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch npm search results (HTTP ${res.status})`);
}
api.emit(
res.json.objects.map((obj) => {
const pkg = obj.package;
const author = pkg.publisher?.username
? ` · by ${pkg.publisher.username}`
: "";
return {
id: pkg.name,
title: `${pkg.name}@${pkg.version}`,
subtitle: `${pkg.description || ""}${author}`,
url: pkg.links.npm,
timestamp: pkg.date,
};
}),
);
}
await fetchData();
return {
refresh: fetchData,
};
}; 相关信息源
Dev.to
开发者Top articles from Dev.to developer community
#dev #articles #programming
GitHub Notifications
开发者Get GitHub notifications in your menu bar. Supports filtering by repository.
#github #notifications #developer
GitHub Trending
开发者Trending repositories on GitHub
#github #trending #programming
Lobsters
开发者Hottest stories from Lobsters
#news #tech #programming