Skip to content

Commit bbdd638

Browse files
authored
chore: merge pull request #5 from threeal/main
Version 0.1.0 Release
2 parents 1b5fb07 + b5f4cd8 commit bbdd638

17 files changed

+7112
-1
lines changed

.eslintrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const dev = require("@actions-kit/dev");
2+
3+
module.exports = dev.createEslintConfig();

.github/workflows/build.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: build
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
branches: ['*', '!latest']
6+
push:
7+
branches: [latest, main]
8+
jobs:
9+
build:
10+
runs-on: macos-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/[email protected]
14+
15+
- name: Cache deps
16+
uses: actions/[email protected]
17+
with:
18+
path: node_modules
19+
key: node-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
20+
21+
- name: Install deps
22+
run: npm install
23+
24+
- name: Check format
25+
run: npm run format
26+
27+
- name: Check lint
28+
run: npm run lint
29+
30+
- name: Clean Project
31+
run: npm run clean
32+
33+
- name: Build project
34+
run: npm run build
35+
36+
- name: Test project
37+
run: npm test
38+
39+
- name: Check diff
40+
run: git diff --exit-code HEAD

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
.*
2+
!.eslint*
23
!.git*
4+
5+
*.log
6+
tsconfig.eslint.json
7+
8+
coverage/
9+
node_modules/

README.md

+44-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,49 @@
11
# Google Rank
22

3-
Google Rank is a tool that provides valuable insights into website visibility on [Google](https://www.google.com/) search results. Track and monitor your website's ranking for specific keywords to optimize online presence and reach a wider audience.
3+
[![build status](https://img.shields.io/github/actions/workflow/status/threeal/google-rank/build.yaml?branch=main)](https://github.com/threeal/google-rank/actions/workflows/build.yaml)
4+
5+
Google Rank is a tool designed to provide valuable insights into website visibility on [Google](https://www.google.com/) search results. By tracking and monitoring your website's ranking for specific keywords, you can optimize your online presence and effectively reach a wider audience.
6+
7+
Whether you're an SEO specialist, a digital marketer, or a website owner, Google Rank empowers you to enhance your website's performance in search engine rankings. With this tool, you can stay informed about your website's visibility, make data-driven decisions, and improve your overall online presence.
8+
9+
## Installation
10+
11+
To install the `google-rank` tool globally, run the following command:
12+
13+
```
14+
$ npm install --global google-rank
15+
```
16+
17+
## Usage
18+
19+
To retrieve the rank of a website for a specific keyword, run the `google-rank` tool followed by the website URL and the search keyword:
20+
21+
```
22+
$ google-rank wikipedia.org krakatoa
23+
24+
Ranks for wikipedia.org website:
25+
1 krakatoa
26+
```
27+
28+
Multiple keywords can also be specified:
29+
30+
```
31+
$ google-rank wikipedia.org krakatoa mit 'social media'
32+
33+
Ranks for wikipedia.org website:
34+
1 krakatoa
35+
2 mit
36+
1 social media
37+
```
38+
39+
If the website is not found for the specified keywords, it will output the rank as `?`:
40+
41+
```
42+
$ google-rank wikipedia.org 'best city to travel'
43+
44+
Ranks for wikipedia.org website:
45+
? best city to travel
46+
```
447

548
## License
649

jest.config.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { createJestConfig } from "@actions-kit/dev";
2+
3+
export default createJestConfig();

lib/google-rank.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

lib/google-rank.js

+25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/google-rank.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/utils.d.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Retrieves a list of websites from Google search results based on the provided keyword.
3+
* @param keyword The keyword to search for.
4+
* @returns A promise that resolves to an array of website URLs.
5+
*/
6+
export declare function listWebsites(keyword: string): Promise<string[]>;
7+
/**
8+
* Retrieves the rank of a website in Google search results for a specific keyword.
9+
* @param website The website URL to check the rank for.
10+
* @param keyword The keyword to search for.
11+
* @returns A promise that resolves to the rank of the website (1-based index). Returns 0 if the website is not found in the search results.
12+
*/
13+
export declare function getWebsiteRank(website: string, keyword: string): Promise<number>;

lib/utils.js

+41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/utils.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)