init
This commit is contained in:
commit
9c88e0a2a3
9 changed files with 138 additions and 0 deletions
10
.editorconfig
Normal file
10
.editorconfig
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
tab_width = 4
|
50
.github/workflows/release-version.yml
vendored
Normal file
50
.github/workflows/release-version.yml
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
name: Publish new theme version
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
# Sequence of patterns matched against refs/tags
|
||||||
|
tags:
|
||||||
|
- "*" # Push events to matching any tag format, i.e. 1.0, 20.15.10
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Bundle
|
||||||
|
id: bundle
|
||||||
|
run: |
|
||||||
|
ls
|
||||||
|
echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)"
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
VERSION: ${{ github.ref }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: ${{ github.ref }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
- name: Upload manifest.json
|
||||||
|
id: upload-manifest
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./manifest.json
|
||||||
|
asset_name: manifest.json
|
||||||
|
asset_content_type: application/json
|
||||||
|
- name: Upload theme.css
|
||||||
|
id: upload-css
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./theme.css
|
||||||
|
asset_name: theme.css
|
||||||
|
asset_content_type: text/css
|
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# vscode
|
||||||
|
.vscode
|
||||||
|
|
||||||
|
# Intellij
|
||||||
|
*.iml
|
||||||
|
.idea
|
||||||
|
|
||||||
|
# npm
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# Exclude sourcemaps
|
||||||
|
*.map
|
||||||
|
|
||||||
|
# Exclude macOS Finder (System Explorer) View States
|
||||||
|
.DS_Store
|
3
README.md
Normal file
3
README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Mainly inspired by:
|
||||||
|
https://github.com/stepanvanzuriak/mono
|
||||||
|
https://github.com/krueger71/crt-themes
|
7
manifest.json
Normal file
7
manifest.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"name": "mono black",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"minAppVersion": "1.0.0",
|
||||||
|
"author": "zc",
|
||||||
|
"authorUrl": "none"
|
||||||
|
}
|
7
package.json
Normal file
7
package.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"name": "mono-black-theme",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"scripts": {
|
||||||
|
"version": "node version-bump.mjs && git add manifest.json versions.json"
|
||||||
|
}
|
||||||
|
}
|
17
theme.css
Normal file
17
theme.css
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
.theme-dark {
|
||||||
|
--color-base-00: #111111;
|
||||||
|
--color-base-05: #111111;
|
||||||
|
--color-base-10: #131313;
|
||||||
|
--color-base-20: #151515;
|
||||||
|
--color-base-25: #171717;
|
||||||
|
--color-base-30: #1f1f1f;
|
||||||
|
--color-base-35: #272727;
|
||||||
|
--color-base-40: #333333;
|
||||||
|
--color-base-50: #404040;
|
||||||
|
--color-base-60: #666666;
|
||||||
|
--color-base-70: #787878;
|
||||||
|
--color-base-100: #cbcbcb;
|
||||||
|
|
||||||
|
--background-secondary: #111111;
|
||||||
|
--background-secondary-alt: #151515;
|
||||||
|
}
|
26
version-bump.mjs
Normal file
26
version-bump.mjs
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
/**
|
||||||
|
* This script makes it slightly easier to release new versions of your
|
||||||
|
* theme. If you are not using Github Releases with your theme, or
|
||||||
|
* you are not interested in automating the process, you can safely ignore
|
||||||
|
* this script.
|
||||||
|
*
|
||||||
|
* Usage: `$ npm run version`
|
||||||
|
*
|
||||||
|
* This script will automatically add a new entry to the versions.json file for
|
||||||
|
* the current version of your theme.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { readFileSync, writeFileSync } from "fs";
|
||||||
|
|
||||||
|
const targetVersion = process.env.npm_package_version;
|
||||||
|
|
||||||
|
// read minAppVersion from manifest.json and bump version to target version
|
||||||
|
let manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
|
||||||
|
const { minAppVersion } = manifest;
|
||||||
|
manifest.version = targetVersion;
|
||||||
|
writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t"));
|
||||||
|
|
||||||
|
// update versions.json with target version and minAppVersion from manifest.json
|
||||||
|
let versions = JSON.parse(readFileSync("versions.json", "utf8"));
|
||||||
|
versions[targetVersion] = minAppVersion;
|
||||||
|
writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));
|
3
versions.json
Normal file
3
versions.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"1.0.0": "1.0.0"
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue