支持nodejs

This commit is contained in:
lutinglt
2025-02-19 22:37:25 +08:00
parent 69e0c063de
commit 04896a3395
5 changed files with 57 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
dist
node_modules
deno.lock
package-lock.json

5
.prettierignore Normal file
View File

@@ -0,0 +1,5 @@
dist/
node_modules/
package-lock.json
deno.json
deno.lock

16
.prettierrc.json Normal file
View File

@@ -0,0 +1,16 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"bracketSameLine": true,
"arrowParens": "avoid",
"proseWrap": "always",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf"
}

View File

@@ -44,14 +44,26 @@ THEMES = gitea-dark, github
## 构建
需要 deno
### 克隆仓库
```bash
git clone https://github.com/lutinglt/gitea-github-theme.git
cd gitea-github-theme
```
### 使用 deno (推荐)
```bash
deno run build
```
### 使用 nodejs & npm
```bash
npm install
npm run build
```
查看用于 Gitea 的主题文件: `./dist/theme-github.css`
## 贡献

21
package.json Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "gitea-github-theme",
"description": "尽量保持与 GitHub Dark 相同样式的 Gitea 主题",
"scripts": {
"export": "sass src/theme-github.scss:dist/theme-github.css --no-source-map",
"build": "npm run export -- --style=compressed",
"watch": "npm run export -- --watch"
},
"repository": {
"type": "git",
"url": "git+https://github.com/lutinglt/gitea-github-theme.git"
},
"bugs": {
"url": "https://github.com/lutinglt/gitea-github-theme/issues"
},
"homepage": "https://github.com/lutinglt/gitea-github-theme#readme",
"devDependencies": {
"js-yaml": "^4.1.0",
"sass": "^1.83.0"
}
}