From 9c88e0a2a3fcbc6132e84e68df8fba442687442c Mon Sep 17 00:00:00 2001 From: ZeChArtiahSaher Date: Mon, 26 Feb 2024 19:12:49 +0100 Subject: [PATCH] init --- .editorconfig | 10 ++++++ .github/workflows/release-version.yml | 50 +++++++++++++++++++++++++++ .gitignore | 15 ++++++++ README.md | 3 ++ manifest.json | 7 ++++ package.json | 7 ++++ theme.css | 17 +++++++++ version-bump.mjs | 26 ++++++++++++++ versions.json | 3 ++ 9 files changed, 138 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/workflows/release-version.yml create mode 100644 .gitignore create mode 100644 README.md create mode 100644 manifest.json create mode 100644 package.json create mode 100644 theme.css create mode 100644 version-bump.mjs create mode 100644 versions.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5fd185c --- /dev/null +++ b/.editorconfig @@ -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 \ No newline at end of file diff --git a/.github/workflows/release-version.yml b/.github/workflows/release-version.yml new file mode 100644 index 0000000..c1da420 --- /dev/null +++ b/.github/workflows/release-version.yml @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..32aa38e --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# vscode +.vscode + +# Intellij +*.iml +.idea + +# npm +node_modules + +# Exclude sourcemaps +*.map + +# Exclude macOS Finder (System Explorer) View States +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 0000000..99e8341 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +Mainly inspired by: +https://github.com/stepanvanzuriak/mono +https://github.com/krueger71/crt-themes diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..5444ff4 --- /dev/null +++ b/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "mono black", + "version": "1.0.0", + "minAppVersion": "1.0.0", + "author": "zc", + "authorUrl": "none" +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..8ec16df --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "name": "mono-black-theme", + "version": "1.0.0", + "scripts": { + "version": "node version-bump.mjs && git add manifest.json versions.json" + } +} diff --git a/theme.css b/theme.css new file mode 100644 index 0000000..1e6419b --- /dev/null +++ b/theme.css @@ -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; +} diff --git a/version-bump.mjs b/version-bump.mjs new file mode 100644 index 0000000..9d0e052 --- /dev/null +++ b/version-bump.mjs @@ -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")); diff --git a/versions.json b/versions.json new file mode 100644 index 0000000..6ac7b35 --- /dev/null +++ b/versions.json @@ -0,0 +1,3 @@ +{ + "1.0.0": "1.0.0" +} \ No newline at end of file