Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
bun-version: ${{ matrix.bun-version }}
- name: πŸ”½ Install Dependencies
run: bun install
- name: πŸ”¨ Build project
run: bun run build
- name: 🏷️ Tag Stable Version
if: ${{ steps.automated_release.outputs.release_created }}
run: |
Expand All @@ -45,13 +47,13 @@ jobs:
git push origin stable
- name: πŸͺ¨ Publish to Open VSX Registry
if: ${{ steps.automated_release.outputs.release_created }}
uses: HaaLeo/publish-vscode-extension@v1
uses: HaaLeo/publish-vscode-extension@v2
id: publish-open-vsx
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
- name: πŸ’Ή Publish to Visual Studio Marketplace
if: ${{ steps.automated_release.outputs.release_created }}
uses: HaaLeo/publish-vscode-extension@v1
uses: HaaLeo/publish-vscode-extension@v2
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,35 @@ jobs:
env:
SCOPRE_OWNER: '@pungrumpy'
runs-on: ${{ matrix.os }}
name: πŸ§ͺ
name: ${{ matrix.os }} - Node.js ${{ matrix.node-version }}
steps:
- name: πŸ”” Checkout
uses: actions/checkout@v4
- name: 🍞 Setup Bun
uses: oven-sh/setup-bun@v1
- name: 🌡 Cache bun
uses: actions/cache@v3
id: cache-bun
uses: actions/cache@v4
id: cache-bun # use this to check for `cache-hit` ==> if: steps.cache-bun.outputs.cache-hit != 'true'
with:
path: ~/.bun
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
- name: πŸ—οΈ Build
- name: πŸ“¦ Install dependencies
if: steps.cache-bun.outputs.cache-hit != 'true'
run: bun install
- name: πŸ” Lint
run: bun run lint
- name: πŸ”¨ Build TypeScript
run: bun run build:ts
- name: 🎨 Build themes
run: bun run build:themes
- name: πŸ“¦ Package extension
run: |
bun add -g @vscode/vsce
vsce package --no-yarn
- name: πŸŽ… Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dullahan-latest
path: dullahan-*.vsix
24 changes: 23 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
node_modules
# Node.js dependencies
node_modules/

# Generated files
*.vsix
dist/

# Generated theme files
themes/*.json

# TypeScript-specific
*.tsbuildinfo

# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor-specific files
.vscode/*
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/tasks.json
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Generated by https://github.com/google-github-actions/release-please-action
CHANGELOG.md
9 changes: 9 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
arrowParens: avoid
singleQuote: true
bracketSpacing: true
endOfLine: lf
semi: false
tabWidth: 2
trailingComma: none
plugins:
- prettier-plugin-packagejson
24 changes: 12 additions & 12 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
"version": "0.2.0",
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"preLaunchTask": "build"
}
]
}
15 changes: 15 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"args": ["run", "build"],
"command": "npm",
"label": "build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
89 changes: 89 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Contributing to Dullahan VS Code Theme

Thank you for your interest in contributing to Dullahan VS Code Theme! This document outlines how the theme is structured and how you can contribute.

## Project Structure

The project has been refactored to use a modular approach for generating theme files:

```
dullahan-vscode-theme/
β”œβ”€β”€ .github/ # GitHub-specific files
β”œβ”€β”€ .vscode/ # VS Code settings
β”œβ”€β”€ assets/ # Theme assets
β”œβ”€β”€ src/ # Source files
β”‚ β”œβ”€β”€ colors/ # UI color definitions
β”‚ β”œβ”€β”€ token-colors/ # Syntax highlighting definitions
β”‚ β”œβ”€β”€ semantic-colors/ # Semantic token coloring
β”‚ β”œβ”€β”€ generate-theme.js # Theme generation script
β”‚ └── index.js # Main build script
β”œβ”€β”€ themes/ # Generated theme files (output)
└── ... # Other project files
```

## Development Workflow

1. **Install Dependencies**

```bash
bun install
```

2. **Make Changes**

- To modify UI colors, edit files in the `src/colors/` directory
- To modify syntax highlighting, edit files in the `src/token-colors/` directory
- To modify semantic tokens, edit files in the `src/semantic-colors/` directory

3. **Build Themes**

```bash
bun run build
```

This will generate the theme JSON files in the `themes/` directory.

4. **Test Your Changes**

- Press F5 in VS Code to launch a new VS Code instance with your theme
- In the new window, select one of the Dullahan themes
- Verify your changes

5. **Package for Testing**
```bash
bun run package
```
This creates a `.vsix` file that you can install in VS Code.

## Creating a New Theme Variant

To create a new theme variant:

1. Create new color files in each directory:

- `src/colors/my-variant.js`
- `src/token-colors/my-variant.js`
- `src/semantic-colors/my-variant.js`

2. Update the index.js files to export your new theme

3. Update the main build script (`src/index.js`) to generate your theme

4. Update `package.json` to include your new theme in the `contributes.themes` section

## Publishing

To publish a new version:

1. Update the version in `package.json`
2. Run `npm run build` to generate the latest themes
3. Run `npm run publish` to publish to the VS Code Marketplace

## Pull Requests

When submitting a pull request:

1. Make sure your code follows the project's style
2. Include screenshots of your changes
3. Explain why your changes are needed
4. Make sure the themes build correctly
Binary file modified assets/preview/dark-dullahan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/preview/golden-dullahan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/preview/white-dullahan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bun.lockb
Binary file not shown.
28 changes: 28 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { FlatCompat } from '@eslint/eslintrc'
import simpleImportSort from 'eslint-plugin-simple-import-sort'
import { dirname } from 'path'
import { fileURLToPath } from 'url'

const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)

const compat = new FlatCompat({
baseDirectory: __dirname
})

/** @type {import("eslint").Linter.Config} */
const eslintConfig = [
...compat.extends(),
{
plugins: {
'simple-import-sort': simpleImportSort
},
rules: {
'@typescript-eslint/member-naming': 0,
'simple-import-sort/exports': 'warn',
'simple-import-sort/imports': 'warn'
}
}
]

export default eslintConfig
70 changes: 45 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
{
"name": "dullahan-vscode-theme",
"displayName": "Dullahan",
"version": "1.2.4",
"description": "A Dullahan theme for VS Code",
"categories": [
"Themes"
],
"keywords": [
"theme",
"dark theme",
"light theme",
"dullahan",
"dark dullahan",
"white dullahan"
],
"repository": {
"type": "git",
"url": "https://github.com/PunGrumpy/dullahan-vscode-theme"
},
"categories": [
"Themes"
],
"license": "MIT",
"publisher": "PunGrumpy",
"scripts": {
"build": "npm run build:ts && npm run build:themes",
"build:themes": "node dist/index.js",
"build:ts": "tsc",
"clean": "rimraf dist themes/*.json",
"format": "prettier --write .",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"package": "npm run build && vsce package",
"publish": "npm run build && vsce publish",
"watch": "tsc -w"
},
"contributes": {
"themes": [
{
Expand All @@ -27,29 +51,25 @@
}
]
},
"description": "A Dullahan theme for VS Code",
"displayName": "Dullahan",
"devDependencies": {
"@moxer/vscode-theme-generator": "1.21.0",
"@types/fs-extra": "11.0.4",
"@types/rimraf": "4.0.5",
"@typescript-eslint/eslint-plugin": "8.25.0",
"@typescript-eslint/parser": "8.25.0",
"@vscode/vsce": "^3.2.2",
"eslint": "9.21.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"fs-extra": "11.3.0",
"prettier": "^3.5.2",
"prettier-plugin-packagejson": "^2.5.9",
"rimraf": "6.0.1",
"typescript": "5.8.2"
},
"engines": {
"vscode": "^1.83.0"
"node": "^23.0.0",
"vscode": "^1.1.37"
},
"keywords": [
"theme",
"dark theme",
"light theme",
"dullahan",
"dark dullahan",
"white dullahan"
],
"pricing": "Free",
"icon": "assets/dullahan-logo.gif",
"license": "MIT",
"publisher": "PunGrumpy",
"scripts": {
"login": "vsce login",
"package": "vsce package",
"publish": "vsce publish"
},
"devDependencies": {
"vsce": "^2.15.0"
}
"pricing": "Free"
}
Loading