Skip to content

Use SDK and indexers package #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[justfile]
indent_size = 4
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

44 changes: 0 additions & 44 deletions .eslintrc.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Deploy to Vercel"

on:
workflow_dispatch:
push:
branches: ["main"]

jobs:
cd:
environment: "production"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v4"

- name: "Set up devkit"
uses: "sablier-labs/devkit/actions/setup@main"
with:
package-manager: "bun"

- name: "Run the code checks"
run: "just full-check"

- name: "Deploy to Vercel"
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: "just deploy"

- name: "Add summary"
run: |
echo "## Continuous Deployment results" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
File renamed without changes.
47 changes: 0 additions & 47 deletions .github/workflows/deploy.yml

This file was deleted.

5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# directories
.cache-loader
.docusaurus
.repomix
build
node_modules
src/autogen/**/*.mdx

# files
*.env
*.log
*.tsbuildinfo
.DS_Store
.eslintcache
.pnp.*
package-lock.json
pnpm-lock.yaml
yarn.lock
9 changes: 9 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @type {import("lint-staged").Configuration}
*/
module.exports = {
"*.{css,js,json,jsonc,jsx,ts,tsx}": "bun biome check --write",
"*.{js,jsx,ts,tsx}": "bun biome lint --write --only correctness/noUnusedImports",
"*.{md,mdx,yaml,yml}": "bun prettier --cache --write",
"*.{md,mdx}": "bun eslint --cache --fix",
};
1 change: 0 additions & 1 deletion .lintstagedrc.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# directories
.cache-loader
.docusaurus
build
node_modules
repos

# files
.pnp.*
package-lock.json
pnpm-lock.yaml
src/autogen/**/*.mdx
9 changes: 9 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const baseConfig = require("@sablier/devkit/prettier");

/**
* @see https://prettier.io/docs/configuration
* @type {import("prettier").Config}
*/
const config = baseConfig;

module.exports = config;
21 changes: 0 additions & 21 deletions .prettierrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
"recommendations": ["biomejs.biome", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "nefrob.vscode-just-syntax"]
}
24 changes: 17 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": ["markdown", "mdx", "javascript", "javascriptreact", "typescript", "typescriptreact"],
"prettier.documentSelectors": ["**/*.tsx"],
"biome.enabled": true,
"eslint.validate": ["md", "mdx"],
"typescript.tsdk": "node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"search.exclude": {
"**/.docusaurus": true,
"**/node_modules": true,
"**/repos": true
".docusaurus": true,
"build": true,
"node_modules": true,
"repos": true
},
"[css][javascript][javascriptreact][typescript][typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"typescript.tsdk": "node_modules/typescript/lib"
"[md][mdx][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
67 changes: 21 additions & 46 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,33 @@ informal concerns or feedback, please join our [Discord server](https://discord.

Contributions to Sablier Docs are welcome by anyone interested in improving readability, or adding new features.

## Pre Requisites
## Prerequisites

You will need the following software on your machine:
- [Node.js](https://nodejs.org) (v20+)
- [Just](https://github.com/casey/just) (command runner)
- [Bun](https://bun.sh) (package manager)
- [Ni](https://github.com/antfu-collective/ni) (package manager resolver)

- [Git] (https://git-scm.com/downloads)
- [Node.Js] (https://nodejs.org/en/download/)
- [Bun] (https://bun.sh/)
### Setup

### Set Up

Clone this repository:

```shell
$ git clone [email protected]:sablier-labs/docs.git && cd docs
```

Then, inside the project's directory, run this to install the Node.js dependencies:

```shell
$ bun install
```

Create a new branch and switch to it, this is where all development work should be done:

```shell
$ git switch <branch-name>
```bash
git clone https://github.com/sablier-labs/docs.git sablier-docs
cd sablier-docs
bun install
```

Now you can start making changes.

Run the following command to starts a local development server and opens up a browser window.
### Available Commands

```shell
$ bun run start
```bash
just --list # Show all available commands
just start # Build the docs site locally on localhost:3000
just full-check # Run all code checks
```

To see a list of all available scripts:

```shell
$ bun run
```

## Pull Requests

- Before you submit your Pull Request (PR), search the project for an open or closed PR related to your submission to
avoid duplicating effort.
- Make your changes in a new git branch.
- Commit your changes. Your commit message should follow the
[Conventional Commits](https://conventionalcommits.org/en/v1.0.0/) specification
- Make sure `bun run check` passes.
- Open a pull request from your forked repository to the original repository.

When making a pull request, ensure that:
### Development Workflow

- A descriptive summary of the PR has been provided.
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run `just full-check` to verify code quality
5. Submit a pull request
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $ bun install
### Local Development

```sh
$ bun run start
$ just start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without
Expand All @@ -23,7 +23,7 @@ having to restart the server.
### Build

```sh
$ bun run build
$ just build
```

This command generates static content into the `build` directory, and can be served using any static contents hosting
Expand All @@ -32,7 +32,7 @@ service.
### Clear cache

```sh
$ bun run clear
$ just clean
```

## License
Expand Down
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

13 changes: 13 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@sablier/devkit/biome"],
"files": {
"includes": [
"**/*.{css,js,json,jsonc,jsx,ts,tsx}",
"!node_modules/**",
"!repos/**",
"!src/autogen/**",
"!static/**"
]
}
}
Loading