Skip to content

Commit

Permalink
chore: merge pull request #5 from threeal/main
Browse files Browse the repository at this point in the history
Version 0.1.0 Release
  • Loading branch information
threeal authored Jul 12, 2023
2 parents 1b5fb07 + b5f4cd8 commit bbdd638
Show file tree
Hide file tree
Showing 17 changed files with 7,112 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const dev = require("@actions-kit/dev");

module.exports = dev.createEslintConfig();
40 changes: 40 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build
on:
workflow_dispatch:
pull_request:
branches: ['*', '!latest']
push:
branches: [latest, main]
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Cache deps
uses: actions/[email protected]
with:
path: node_modules
key: node-${{ runner.os }}-${{ hashFiles('package-lock.json') }}

- name: Install deps
run: npm install

- name: Check format
run: npm run format

- name: Check lint
run: npm run lint

- name: Clean Project
run: npm run clean

- name: Build project
run: npm run build

- name: Test project
run: npm test

- name: Check diff
run: git diff --exit-code HEAD
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
.*
!.eslint*
!.git*

*.log
tsconfig.eslint.json

coverage/
node_modules/
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,49 @@
# Google Rank

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.
[![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)

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.

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.

## Installation

To install the `google-rank` tool globally, run the following command:

```
$ npm install --global google-rank
```

## Usage

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:

```
$ google-rank wikipedia.org krakatoa
Ranks for wikipedia.org website:
1 krakatoa
```

Multiple keywords can also be specified:

```
$ google-rank wikipedia.org krakatoa mit 'social media'
Ranks for wikipedia.org website:
1 krakatoa
2 mit
1 social media
```

If the website is not found for the specified keywords, it will output the rank as `?`:

```
$ google-rank wikipedia.org 'best city to travel'
Ranks for wikipedia.org website:
? best city to travel
```

## License

Expand Down
3 changes: 3 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createJestConfig } from "@actions-kit/dev";

export default createJestConfig();
1 change: 1 addition & 0 deletions lib/google-rank.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
25 changes: 25 additions & 0 deletions lib/google-rank.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/google-rank.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions lib/utils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Retrieves a list of websites from Google search results based on the provided keyword.
* @param keyword The keyword to search for.
* @returns A promise that resolves to an array of website URLs.
*/
export declare function listWebsites(keyword: string): Promise<string[]>;
/**
* Retrieves the rank of a website in Google search results for a specific keyword.
* @param website The website URL to check the rank for.
* @param keyword The keyword to search for.
* @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.
*/
export declare function getWebsiteRank(website: string, keyword: string): Promise<number>;
41 changes: 41 additions & 0 deletions lib/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/utils.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bbdd638

Please sign in to comment.