Skip to content

Commit

Permalink
feat: add Aurora X theme (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
kaf-lamed-beyt and antfu committed Jan 1, 2024
1 parent 9441117 commit 2b88263
Show file tree
Hide file tree
Showing 5 changed files with 704 additions and 7 deletions.
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,31 @@ Scripts are extracted and modified from [Shiki](https://github.com/shikijs/shiki
### Add a new grammar

1. Fork this repository
2. Add grammar source and metadata to [`sources-grammars.ts`](./sources-grammars.ts)
3. Add a code sample file `<id>.sample` for your language under [`./samples`](./samples). A sample should include a variety of language syntaxes and succinctly capture the idiosyncrasy of a language. Format requirements:
2. Install the dependencies with `pnpm i`
3. Add grammar source and metadata to [`sources-grammars.ts`](./sources-grammars.ts)
4. Add a code sample file `<id>.sample` for your language under [`./samples`](./samples). A sample should include a variety of language syntaxes and succinctly capture the idiosyncrasy of a language. Format requirements:
- Space for indentation
- Less than 100 columns if possible
- Link to source in the last line, for example `# From https://poignant.guide/book/chapter-5.html`
4. Run `pnpm run fetch` to download the grammar and verify it works
5. Send in the PR!
- Link to source in the last line, for example, `# From` https://poignant.guide/book/chapter-5.html`
5. Generate a [personal access token](https://github.com/settings/tokens?type=beta), keep the default, no extra permission is needed. This token is used to query public information from GitHub API and avoid rate limits.
6. Create a `.env` file and past your generated token into the file like so:
```bash
GITHUB_TOKEN=your-personal-access-token
```
7. Run `pnpm run fetch` to download the grammar and verify it works
8. Send in the PR!

### Add a new theme

1. Fork this repository
2. Add theme source and metadata to [`sources-themes.ts`](./sources-themes.ts)
3. Run `pnpm run fetch` to download the theme and verify it works
2. Install the dependencies with `pnpm i`
3. Add theme source and metadata to [`sources-themes.ts`](./sources-themes.ts)
4. Generate a [personal access token](https://github.com/settings/tokens?type=beta), keep the default, no extra permission is needed. This token is used to query public information from GitHub API and avoid rate limits.
5. Create a `.env` file and past your generated token into the file like so:
```bash
GITHUB_TOKEN=your-personal-access-token
```
6. Run `pnpm run fetch` to download the theme and verify it works
4. Send in the PR!

## License
Expand Down
1 change: 1 addition & 0 deletions packages/tm-themes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { themes } from 'tm-themes'

| Name | ID | Source | License | File Size |
| ---- | -- | ------ | ------- | --------- |
| Aurora X | `aurora-x` | [marqu3ss/Aurora-X](https://github.com/marqu3ss/Aurora-X/blob/118727efadf48872adcd81f6c00be580097d6592/themes/Aurora%20X-color-theme.json) | | 13.28 kB |
| Catppuccin Frappe | `catppuccin-frappe` | [catppuccin/vscode](https://github.com/catppuccin/vscode/blob/a97886a1c95198f042d0d0010145260338e81b24/frappe.json) | [MIT](https://raw.githubusercontent.com/catppuccin/vscode/main/LICENSE) | 42.19 kB |
| Catppuccin Latte | `catppuccin-latte` | [catppuccin/vscode](https://github.com/catppuccin/vscode/blob/a97886a1c95198f042d0d0010145260338e81b24/latte.json) | [MIT](https://raw.githubusercontent.com/catppuccin/vscode/main/LICENSE) | 42.19 kB |
| Catppuccin Macchiato | `catppuccin-macchiato` | [catppuccin/vscode](https://github.com/catppuccin/vscode/blob/a97886a1c95198f042d0d0010145260338e81b24/macchiato.json) | [MIT](https://raw.githubusercontent.com/catppuccin/vscode/main/LICENSE) | 42.20 kB |
Expand Down
8 changes: 8 additions & 0 deletions packages/tm-themes/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
export const themes = [
{
byteSize: 13599,
displayName: 'Aurora X',
name: 'aurora-x',
sha: '118727efadf48872adcd81f6c00be580097d6592',
source: 'https://github.com/marqu3ss/Aurora-X/blob/118727efadf48872adcd81f6c00be580097d6592/themes/Aurora%20X-color-theme.json',
type: 'dark',
},
{
byteSize: 43204,
displayName: 'Catppuccin Frappe',
Expand Down
Loading

0 comments on commit 2b88263

Please sign in to comment.