From 35c69ac2b4be4dc55b768b4f28d46c04ac1ca7c2 Mon Sep 17 00:00:00 2001 From: Mauricio Bonani Date: Wed, 10 Jan 2024 15:11:38 -0500 Subject: [PATCH] Improve theme creation/update process --- DEVELOPMENT.md | 53 +++++++++++++------ README.md | 10 ++-- scripts/build.js | 18 ++++--- scripts/create-theme.js | 24 ++++----- scripts/dev.js | 51 ++++++++++-------- scripts/init.js | 2 +- .../{template-custom.css => theme-custom.css} | 0 template/theme-mermaid.json | 1 + ...template-monaco.json => theme-monaco.json} | 0 template/{template.scss => theme.scss} | 0 themes.js | 6 +-- .../{aurora-custom.css => theme-custom.css} | 0 themes/aurora/theme-mermaid.json | 1 + .../{aurora-monaco.json => theme-monaco.json} | 0 themes/aurora/{aurora.scss => theme.scss} | 0 .../{cobalt2-custom.css => theme-custom.css} | 0 themes/cobalt2/theme-mermaid.json | 1 + ...{cobalt2-monaco.json => theme-monaco.json} | 0 themes/cobalt2/{cobalt2.scss => theme.scss} | 0 .../{dark-custom.css => theme-custom.css} | 0 themes/dark/theme-mermaid.json | 1 + .../{dark-monaco.json => theme-monaco.json} | 0 themes/dark/{dark.scss => theme.scss} | 0 .../{dracula-custom.css => theme-custom.css} | 0 themes/dracula/theme-mermaid.json | 1 + ...{dracula-monaco.json => theme-monaco.json} | 0 themes/dracula/{dracula.scss => theme.scss} | 0 ...esso-libre-custom.css => theme-custom.css} | 0 themes/espresso-libre/theme-mermaid.json | 1 + ...so-libre-monaco.json => theme-monaco.json} | 0 .../{espresso-libre.scss => theme.scss} | 0 ...rk-default-custom.css => theme-custom.css} | 0 themes/github-dark-default/theme-mermaid.json | 1 + ...-default-monaco.json => theme-monaco.json} | 0 .../{github-dark-default.scss => theme.scss} | 0 ...ark-dimmed-custom.css => theme-custom.css} | 0 themes/github-dark-dimmed/theme-mermaid.json | 1 + ...k-dimmed-monaco.json => theme-monaco.json} | 0 .../{github-dark-dimmed.scss => theme.scss} | 0 ...ithub-dark-custom.css => theme-custom.css} | 0 themes/github-dark/theme-mermaid.json | 1 + ...hub-dark-monaco.json => theme-monaco.json} | 0 .../{github-dark.scss => theme.scss} | 0 ...dnight-red-custom.css => theme-custom.css} | 0 themes/midnight-red/theme-mermaid.json | 1 + ...ight-red-monaco.json => theme-monaco.json} | 0 .../{midnight-red.scss => theme.scss} | 0 ...industrial-custom.css => theme-custom.css} | 0 themes/monoindustrial/theme-mermaid.json | 1 + ...dustrial-monaco.json => theme-monaco.json} | 0 .../{monoindustrial.scss => theme.scss} | 0 ...kai-dimmed-custom.css => theme-custom.css} | 0 themes/monokai-dimmed/theme-mermaid.json | 1 + ...i-dimmed-monaco.json => theme-monaco.json} | 0 .../{monokai-dimmed.scss => theme.scss} | 0 .../{monokai-custom.css => theme-custom.css} | 0 themes/monokai/theme-mermaid.json | 1 + ...{monokai-monaco.json => theme-monaco.json} | 0 themes/monokai/{monokai.scss => theme.scss} | 0 .../{noctis-custom.css => theme-custom.css} | 0 themes/noctis/theme-mermaid.json | 1 + .../{noctis-monaco.json => theme-monaco.json} | 0 themes/noctis/{noctis.scss => theme.scss} | 0 ...eanic-next-custom.css => theme-custom.css} | 0 themes/oceanic-next/theme-mermaid.json | 1 + ...nic-next-monaco.json => theme-monaco.json} | 0 .../{oceanic-next.scss => theme.scss} | 0 .../{oled-custom.css => theme-custom.css} | 0 themes/oled/theme-mermaid.json | 1 + .../{oled-monaco.json => theme-monaco.json} | 0 themes/oled/{oled.scss => theme.scss} | 0 ...pro-darker-custom.css => theme-custom.css} | 0 themes/one-dark-pro-darker/theme-mermaid.json | 1 + ...o-darker-monaco.json => theme-monaco.json} | 0 .../{one-dark-pro-darker.scss => theme.scss} | 0 ...e-dark-pro-custom.css => theme-custom.css} | 0 themes/one-dark-pro/theme-mermaid.json | 1 + ...dark-pro-monaco.json => theme-monaco.json} | 0 .../{one-dark-pro.scss => theme.scss} | 0 ...rized-dark-custom.css => theme-custom.css} | 0 themes/solarized-dark/theme-mermaid.json | 1 + ...zed-dark-monaco.json => theme-monaco.json} | 0 .../{solarized-dark.scss => theme.scss} | 0 ...ized-light-custom.css => theme-custom.css} | 0 ...-light-mermaid.json => theme-mermaid.json} | 0 ...ed-light-monaco.json => theme-monaco.json} | 0 .../{solarized-light.scss => theme.scss} | 0 ...ight-light-custom.css => theme-custom.css} | 0 ...-light-mermaid.json => theme-mermaid.json} | 0 ...ht-light-monaco.json => theme-monaco.json} | 0 .../{tokyo-night-light.scss => theme.scss} | 0 ...ight-storm-custom.css => theme-custom.css} | 0 themes/tokyo-night-storm/theme-mermaid.json | 1 + ...ht-storm-monaco.json => theme-monaco.json} | 0 .../{tokyo-night-storm.scss => theme.scss} | 0 ...okyo-night-custom.css => theme-custom.css} | 0 themes/tokyo-night/theme-mermaid.json | 1 + ...yo-night-monaco.json => theme-monaco.json} | 0 .../{tokyo-night.scss => theme.scss} | 0 ...nformation-custom.css => theme-custom.css} | 0 ...mation-mermaid.json => theme-mermaid.json} | 0 ...ormation-monaco.json => theme-monaco.json} | 0 .../{totallyinformation.scss => theme.scss} | 0 .../{zenburn-custom.css => theme-custom.css} | 0 themes/zenburn/theme-mermaid.json | 1 + ...{zenburn-monaco.json => theme-monaco.json} | 0 themes/zenburn/{zenburn.scss => theme.scss} | 0 107 files changed, 120 insertions(+), 66 deletions(-) rename template/{template-custom.css => theme-custom.css} (100%) create mode 100644 template/theme-mermaid.json rename template/{template-monaco.json => theme-monaco.json} (100%) rename template/{template.scss => theme.scss} (100%) rename themes/aurora/{aurora-custom.css => theme-custom.css} (100%) create mode 100644 themes/aurora/theme-mermaid.json rename themes/aurora/{aurora-monaco.json => theme-monaco.json} (100%) rename themes/aurora/{aurora.scss => theme.scss} (100%) rename themes/cobalt2/{cobalt2-custom.css => theme-custom.css} (100%) create mode 100644 themes/cobalt2/theme-mermaid.json rename themes/cobalt2/{cobalt2-monaco.json => theme-monaco.json} (100%) rename themes/cobalt2/{cobalt2.scss => theme.scss} (100%) rename themes/dark/{dark-custom.css => theme-custom.css} (100%) create mode 100644 themes/dark/theme-mermaid.json rename themes/dark/{dark-monaco.json => theme-monaco.json} (100%) rename themes/dark/{dark.scss => theme.scss} (100%) rename themes/dracula/{dracula-custom.css => theme-custom.css} (100%) create mode 100644 themes/dracula/theme-mermaid.json rename themes/dracula/{dracula-monaco.json => theme-monaco.json} (100%) rename themes/dracula/{dracula.scss => theme.scss} (100%) rename themes/espresso-libre/{espresso-libre-custom.css => theme-custom.css} (100%) create mode 100644 themes/espresso-libre/theme-mermaid.json rename themes/espresso-libre/{espresso-libre-monaco.json => theme-monaco.json} (100%) rename themes/espresso-libre/{espresso-libre.scss => theme.scss} (100%) rename themes/github-dark-default/{github-dark-default-custom.css => theme-custom.css} (100%) create mode 100644 themes/github-dark-default/theme-mermaid.json rename themes/github-dark-default/{github-dark-default-monaco.json => theme-monaco.json} (100%) rename themes/github-dark-default/{github-dark-default.scss => theme.scss} (100%) rename themes/github-dark-dimmed/{github-dark-dimmed-custom.css => theme-custom.css} (100%) create mode 100644 themes/github-dark-dimmed/theme-mermaid.json rename themes/github-dark-dimmed/{github-dark-dimmed-monaco.json => theme-monaco.json} (100%) rename themes/github-dark-dimmed/{github-dark-dimmed.scss => theme.scss} (100%) rename themes/github-dark/{github-dark-custom.css => theme-custom.css} (100%) create mode 100644 themes/github-dark/theme-mermaid.json rename themes/github-dark/{github-dark-monaco.json => theme-monaco.json} (100%) rename themes/github-dark/{github-dark.scss => theme.scss} (100%) rename themes/midnight-red/{midnight-red-custom.css => theme-custom.css} (100%) create mode 100644 themes/midnight-red/theme-mermaid.json rename themes/midnight-red/{midnight-red-monaco.json => theme-monaco.json} (100%) rename themes/midnight-red/{midnight-red.scss => theme.scss} (100%) rename themes/monoindustrial/{monoindustrial-custom.css => theme-custom.css} (100%) create mode 100644 themes/monoindustrial/theme-mermaid.json rename themes/monoindustrial/{monoindustrial-monaco.json => theme-monaco.json} (100%) rename themes/monoindustrial/{monoindustrial.scss => theme.scss} (100%) rename themes/monokai-dimmed/{monokai-dimmed-custom.css => theme-custom.css} (100%) create mode 100644 themes/monokai-dimmed/theme-mermaid.json rename themes/monokai-dimmed/{monokai-dimmed-monaco.json => theme-monaco.json} (100%) rename themes/monokai-dimmed/{monokai-dimmed.scss => theme.scss} (100%) rename themes/monokai/{monokai-custom.css => theme-custom.css} (100%) create mode 100644 themes/monokai/theme-mermaid.json rename themes/monokai/{monokai-monaco.json => theme-monaco.json} (100%) rename themes/monokai/{monokai.scss => theme.scss} (100%) rename themes/noctis/{noctis-custom.css => theme-custom.css} (100%) create mode 100644 themes/noctis/theme-mermaid.json rename themes/noctis/{noctis-monaco.json => theme-monaco.json} (100%) rename themes/noctis/{noctis.scss => theme.scss} (100%) rename themes/oceanic-next/{oceanic-next-custom.css => theme-custom.css} (100%) create mode 100644 themes/oceanic-next/theme-mermaid.json rename themes/oceanic-next/{oceanic-next-monaco.json => theme-monaco.json} (100%) rename themes/oceanic-next/{oceanic-next.scss => theme.scss} (100%) rename themes/oled/{oled-custom.css => theme-custom.css} (100%) create mode 100644 themes/oled/theme-mermaid.json rename themes/oled/{oled-monaco.json => theme-monaco.json} (100%) rename themes/oled/{oled.scss => theme.scss} (100%) rename themes/one-dark-pro-darker/{one-dark-pro-darker-custom.css => theme-custom.css} (100%) create mode 100644 themes/one-dark-pro-darker/theme-mermaid.json rename themes/one-dark-pro-darker/{one-dark-pro-darker-monaco.json => theme-monaco.json} (100%) rename themes/one-dark-pro-darker/{one-dark-pro-darker.scss => theme.scss} (100%) rename themes/one-dark-pro/{one-dark-pro-custom.css => theme-custom.css} (100%) create mode 100644 themes/one-dark-pro/theme-mermaid.json rename themes/one-dark-pro/{one-dark-pro-monaco.json => theme-monaco.json} (100%) rename themes/one-dark-pro/{one-dark-pro.scss => theme.scss} (100%) rename themes/solarized-dark/{solarized-dark-custom.css => theme-custom.css} (100%) create mode 100644 themes/solarized-dark/theme-mermaid.json rename themes/solarized-dark/{solarized-dark-monaco.json => theme-monaco.json} (100%) rename themes/solarized-dark/{solarized-dark.scss => theme.scss} (100%) rename themes/solarized-light/{solarized-light-custom.css => theme-custom.css} (100%) rename themes/solarized-light/{solarized-light-mermaid.json => theme-mermaid.json} (100%) rename themes/solarized-light/{solarized-light-monaco.json => theme-monaco.json} (100%) rename themes/solarized-light/{solarized-light.scss => theme.scss} (100%) rename themes/tokyo-night-light/{tokyo-night-light-custom.css => theme-custom.css} (100%) rename themes/tokyo-night-light/{tokyo-night-light-mermaid.json => theme-mermaid.json} (100%) rename themes/tokyo-night-light/{tokyo-night-light-monaco.json => theme-monaco.json} (100%) rename themes/tokyo-night-light/{tokyo-night-light.scss => theme.scss} (100%) rename themes/tokyo-night-storm/{tokyo-night-storm-custom.css => theme-custom.css} (100%) create mode 100644 themes/tokyo-night-storm/theme-mermaid.json rename themes/tokyo-night-storm/{tokyo-night-storm-monaco.json => theme-monaco.json} (100%) rename themes/tokyo-night-storm/{tokyo-night-storm.scss => theme.scss} (100%) rename themes/tokyo-night/{tokyo-night-custom.css => theme-custom.css} (100%) create mode 100644 themes/tokyo-night/theme-mermaid.json rename themes/tokyo-night/{tokyo-night-monaco.json => theme-monaco.json} (100%) rename themes/tokyo-night/{tokyo-night.scss => theme.scss} (100%) rename themes/totallyinformation/{totallyinformation-custom.css => theme-custom.css} (100%) rename themes/totallyinformation/{totallyinformation-mermaid.json => theme-mermaid.json} (100%) rename themes/totallyinformation/{totallyinformation-monaco.json => theme-monaco.json} (100%) rename themes/totallyinformation/{totallyinformation.scss => theme.scss} (100%) rename themes/zenburn/{zenburn-custom.css => theme-custom.css} (100%) create mode 100644 themes/zenburn/theme-mermaid.json rename themes/zenburn/{zenburn-monaco.json => theme-monaco.json} (100%) rename themes/zenburn/{zenburn.scss => theme.scss} (100%) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 935d119..d09d5d2 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -2,9 +2,12 @@ This document describes the process for creating/updating themes. +Please read and follow [our contribution guidelines][contribution-guidelines]. + ## Getting started 1. [Fork][fork] and clone this project + 1. Enter the project directory and initialize the development environment cd theme-collection @@ -16,34 +19,53 @@ This document describes the process for creating/updating themes. With the development environment initialized, follow these steps to create a new theme: -***NOTE:** Replace `` with the name of the theme you are working on.* +1. Create the new theme following these rules: + + - Must start with a letter or number + - Must be at least 3 characters long + - Only letters, numbers, and - are allowed + + e.g., theme, theme-name, or 007-theme + + This creates a theme named ***example-theme***, replace it with the theme name being created. + + npm run create-theme example-theme + + The result will be following directory structure. + + themes + └── example-theme + ├── theme.scss + ├── theme-custom.css + ├── theme-mermaid.json + └── theme-monaco.json -1. Create the new theme directory structure +1. Enter the theme directory and start the development environment - npm run create-theme + cd themes/example-theme + npm run dev example-theme -2. Start the development environment + ***NOTE:** Replace ***example-theme*** with the name of the theme being created/updated.* - npm run dev +1. Access Node-RED at [http://localhost:41880](http://localhost:41880) -3. Access Node-RED at [`http://localhost:41880`](http://localhost:41880) +1. Update the colors in `theme.scss` as required -4. Update the colors in `themes//.scss` as required & save +1. ***(OPTIONAL)*** If additional customizations are needed, add them to `theme-custom.css`. -5. ***(OPTIONAL)*** If additional customizations are needed, add them to `themes//-custom.css`. +1. ***(OPTIONAL)*** Update `theme-monaco.json` to customize the colors of the Monaco Editor. -6. ***(OPTIONAL)*** Update `themes//-monaco.json` to customize the colors of the Monaco Editor. This file can be configured in two different ways: + The default value is `"tomorrow-night-bright"`. Replace it with the name of one of the themes in this [list][monaco-editor-builtin-themes] or with a custom Monaco theme object (see the Node-RED documentation [file example][setting-a-custom-monaco-theme-from-a-json-file] for reference). - - Built-in theme - Add `""` to the file. Replace `""` with the name of one of the themes in this [list][monaco-editor-builtin-themes]. - - Custom Monaco theme object - See the [`my-custom-theme-monaco-theme.json` file example][setting-a-custom-monaco-theme-from-a-json-file] in the Node-RED documentation for reference. +1. ***(OPTIONAL)*** Customize Mermaid's theme file - `theme-mermaid.json` -7. ***(OPTIONAL)*** Customize Mermaid's theme by adding `""` to `themes//-mermaid.json`. Replace `` with the name of one of the themes in this [list](https://mermaid.js.org/config/theming.html#available-themes). If the file doesn't exist, the value `"dark"` is used by default. + The default value is `"dark"`. Replace it with the name of one of the themes in this [list](https://mermaid.js.org/config/theming.html#available-themes). -8. Refresh Node-RED in the browser to preview the changes +1. Refresh Node-RED in the browser to preview the changes -9. Repeat steps 4 to 7 as needed. When finished, press `ctrl-D` to quit the development environment. +1. Repeat steps 4 to 8 as needed. When finished, press `ctrl-D` to quit the development environment -10. Commit, push, and create a pull request. +1. Commit, push, and create a pull request ## Updating an existing theme @@ -51,6 +73,7 @@ Follow the process above, skipping step 1. Thanks for taking the time to contribute! 😍 +[contribution-guidelines]: .github/CONTRIBUTING.md [fork]: https://github.com/node-red-contrib-themes/theme-collection/fork [monaco-editor-builtin-themes]: https://github.com/node-red/node-red/tree/master/packages/node_modules/%40node-red/editor-client/src/vendor/monaco/dist/theme [setting-a-custom-monaco-theme-from-a-json-file]: https://nodered.org/docs/api/ui/themes/#setting-a-custom-monaco-theme-from-a-json-file diff --git a/README.md b/README.md index 5d2f487..d44a05e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ A collection of themes for [Node-RED][node-red]. - [Usage](#usage) - [Themed Scrollbars \[DEPRECATED\]](#themed-scrollbars-deprecated) - [Monaco Editor Theme](#monaco-editor-theme) -- [Contributing](#contributing) +- [Development](#development) - [License](#license) ## Installation @@ -116,11 +116,9 @@ editorTheme: { }, ``` -## Contributing +## Development -First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are **greatly appreciated**. - -Please read [our contribution guidelines][contribution-guidelines], and thank you again for being involved! +Please refer to the [`DEVELOPMENT.md`][development] file for details on how to set up a local development environment. ## License @@ -128,8 +126,8 @@ This project is licensed under the [MIT license][license]. [buymecoffee-link]: https://www.buymeacoffee.com/mbonani [buymecoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png -[contribution-guidelines]: .github/CONTRIBUTING.md [creating-a-new-theme]: DEVELOPMENT.md +[development]: DEVELOPMENT.md [license-badge]: https://img.shields.io/github/license/node-red-contrib-themes/theme-collection.svg?style=for-the-badge [license]: LICENSE [node-red-doc]: https://nodered.org/docs/user-guide/runtime/configuration#editor-themes diff --git a/scripts/build.js b/scripts/build.js index 23833e0..63fe4de 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -8,21 +8,25 @@ const themesPath = path.join(rootPath, 'themes') const themes = readdirSync(themesPath) themes.forEach(themeName => { - const themePath = path.join(themesPath, themeName) - const buildIn = path.join(themePath, themeName + '.scss') - const buildOut = path.join(themePath, themeName + '.min.css') + const buildIn = path.join(themePath, 'theme.scss') + const buildOut = path.join(themePath, `${themeName}.min.css`) const buildSrc = path.join(rootPath, 'node-red') exec(`node ${rootPath}/scripts/build-theme.js --in=${buildIn} --out=${buildOut} --src=${buildSrc}`) - const themeCustomCss = readFileSync(path.resolve(themePath, themeName + '-custom.css'), 'utf-8') + const themeCustomCss = readFileSync(path.resolve(themePath, 'theme-custom.css'), 'utf-8') const minifiedCss = minify(themeCustomCss).css - writeFileSync(path.resolve(themePath, themeName + '-custom.min.css'), minifiedCss) + writeFileSync(path.resolve(themePath, `${themeName}-custom.min.css`), minifiedCss) + + const mermaidOptions = JSON.parse(readFileSync(path.resolve(themePath, 'theme-mermaid.json'), 'utf-8')) + const minifiedMermaidOptions = JSON.stringify(mermaidOptions) + + writeFileSync(path.resolve(themePath, `${themeName}-mermaid.min.json`), minifiedMermaidOptions) - const monacoOptions = JSON.parse(readFileSync(path.resolve(themePath, themeName + '-monaco.json'), 'utf-8')) + const monacoOptions = JSON.parse(readFileSync(path.resolve(themePath, 'theme-monaco.json'), 'utf-8')) const minifiedMonacoOptions = JSON.stringify(monacoOptions) - writeFileSync(path.resolve(themePath, themeName + '-monaco.min.json'), minifiedMonacoOptions) + writeFileSync(path.resolve(themePath, `${themeName}-monaco.min.json`), minifiedMonacoOptions) }) \ No newline at end of file diff --git a/scripts/create-theme.js b/scripts/create-theme.js index e037019..05614f6 100644 --- a/scripts/create-theme.js +++ b/scripts/create-theme.js @@ -7,10 +7,17 @@ const rootPath = path.join(__dirname, '..') const themePath = path.join(rootPath, 'themes', options.themeName) if (!options.themeName) { + console.error('Missing argument: theme-name') showUsageAndExit(1) } if (!/^[a-zA-Z0-9][a-zA-Z0-9\-]{2,}$/.test(options.themeName)) { + console.error('Theme name does not follow the rules') + console.log('') + console.log('Rules for theme names:') + console.log('- at least 3 characters long') + console.log('- only letters, numbers, and -') + console.log('- start with a letter or number') showUsageAndExit(1) } @@ -23,20 +30,13 @@ if (existsSync(themePath)) { mkdirSync(themePath) // Copy template files to theme directory -copyFileSync(path.join(rootPath, 'template/template.scss'), path.join(themePath, options.themeName + '.scss')) -copyFileSync(path.join(rootPath, 'template/template-monaco.json'), path.join(themePath, options.themeName + '-monaco.json')) -copyFileSync(path.join(rootPath, 'template/template-custom.css'), path.join(themePath, options.themeName + '-custom.css')) +copyFileSync(path.join(rootPath, 'template/theme.scss'), path.join(themePath, 'theme.scss')) +copyFileSync(path.join(rootPath, 'template/theme-custom.css'), path.join(themePath, 'theme-custom.css')) +copyFileSync(path.join(rootPath, 'template/theme-mermaid.json'), path.join(themePath, 'theme-mermaid.json')) +copyFileSync(path.join(rootPath, 'template/theme-monaco.json'), path.join(themePath, 'theme-monaco.json')) function showUsageAndExit(exitCode) { console.log('') - console.log('Usage: create-theme theme-name') - console.log('Example: npm run create-theme theme-name') - console.log('Example: node ./scripts/create-theme.js theme-name') - console.log('') - console.log('Rules for theme names:') - console.log('- must be at least 3 characters') - console.log('- only letters, numbers, and -') - console.log('- start with a letter or number') - console.log(' e.g., theme-name or 007-theme') + console.log('Usage: npm run create-theme theme-name') process.exit(exitCode) } \ No newline at end of file diff --git a/scripts/dev.js b/scripts/dev.js index 8fa4e32..87280ab 100644 --- a/scripts/dev.js +++ b/scripts/dev.js @@ -6,42 +6,51 @@ const { existsSync, readFileSync, watch, writeFileSync } = require('fs') const { exec } = require('child_process') const { minify } = require('csso') const nodemon = require('nodemon') -const themeName = String(options.themeName.split('-scroll', 1)) -const rootPath = path.join(__dirname, '..') -const themePath = path.join(rootPath, 'themes', themeName) -const buildIn = path.join(themePath, themeName + '.scss') -const buildOut = path.join(themePath, themeName + '.min.css') -const buildSrc = path.join(rootPath, 'node-red') if (!options.themeName) { showUsageAndExit(1) } + +const rootPath = path.join(__dirname, '..') +const themeName = String(options.themeName.split('-scroll', 1)) +const themePath = path.join(rootPath, 'themes', themeName) +const buildIn = path.join(themePath, 'theme.scss') +const buildOut = path.join(themePath, `${themeName}.min.css`) +const buildSrc = path.join(rootPath, 'node-red') + if (options.themeName && !existsSync(themePath)) { - console.warn('') - console.warn(`Theme path is not valid. Could not find '${themePath}'`) - console.warn('Please create the theme first') - console.warn('') - console.warn('Example:') - console.warn(`npm run create-theme ${themeName}`) + console.error(`Theme path is not valid. Could not find '${themePath}'`) + console.log('') + console.log('Please create the theme first') + console.log('') + console.log('Example:') + console.log(`npm run create-theme ${themeName}`) process.exit(2) } -watch(path.join(themePath, themeName + '.scss'), () => { +watch(path.join(themePath, 'theme.scss'), () => { exec(`node ${rootPath}/scripts/build-theme.js --in=${buildIn} --out=${buildOut} --src=${buildSrc}`) }) -watch(path.join(themePath, themeName + '-custom.css'), () => { - const themeCustomCss = readFileSync(path.join(themePath, themeName + '-custom.css'), 'utf-8') +watch(path.join(themePath, 'theme-custom.css'), () => { + const themeCustomCss = readFileSync(path.join(themePath, 'theme-custom.css'), 'utf-8') const minifiedCss = minify(themeCustomCss).css - writeFileSync(path.join(themePath, themeName + '-custom.min.css'), minifiedCss) + writeFileSync(path.join(themePath, `${themeName}-custom.min.css`), minifiedCss) +}) + +watch(path.join(themePath, 'theme-mermaid.json'), () => { + const mermaidOptions = JSON.parse(readFileSync(path.join(themePath, 'theme-mermaid.json'), 'utf-8')) + const minifiedMermaidOptions = JSON.stringify(mermaidOptions) + + writeFileSync(path.join(themePath, `${themeName}-mermaid.min.json`), minifiedMermaidOptions) }) -watch(path.join(themePath, themeName + '-monaco.json'), () => { - const monacoOptions = JSON.parse(readFileSync(path.join(themePath, themeName + '-monaco.json'), 'utf-8')) +watch(path.join(themePath, 'theme-monaco.json'), () => { + const monacoOptions = JSON.parse(readFileSync(path.join(themePath, 'theme-monaco.json'), 'utf-8')) const minifiedMonacoOptions = JSON.stringify(monacoOptions) - writeFileSync(path.join(themePath, themeName + '-monaco.min.json'), minifiedMonacoOptions) + writeFileSync(path.join(themePath, `${themeName}-monaco.min.json`), minifiedMonacoOptions) }) nodemon({ @@ -56,8 +65,6 @@ nodemon({ function showUsageAndExit(exitCode) { console.log('') - console.log('Usage: dev theme-name') - console.log('Example: npm run dev theme-name') - console.log('Example: node ./scripts/dev.js theme-name') + console.log('Usage: npm run dev theme-name') process.exit(exitCode) } \ No newline at end of file diff --git a/scripts/init.js b/scripts/init.js index 5889dd3..733236d 100644 --- a/scripts/init.js +++ b/scripts/init.js @@ -52,7 +52,7 @@ async function step(command, workingDir, stepPrompt) { try { await runner(command, { cwd: workingDir }, stepPrompt) - log(String(stepPrompt.split(" - ", 1) + ' ✔')) + log(`${stepPrompt.split(" - ", 1)} ✔`) } catch (err) { error(err.toString()) error(err.stderr) diff --git a/template/template-custom.css b/template/theme-custom.css similarity index 100% rename from template/template-custom.css rename to template/theme-custom.css diff --git a/template/theme-mermaid.json b/template/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/template/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/template/template-monaco.json b/template/theme-monaco.json similarity index 100% rename from template/template-monaco.json rename to template/theme-monaco.json diff --git a/template/template.scss b/template/theme.scss similarity index 100% rename from template/template.scss rename to template/theme.scss diff --git a/themes.js b/themes.js index e4d5dff..775187e 100644 --- a/themes.js +++ b/themes.js @@ -12,8 +12,8 @@ module.exports = function (RED) { const type = { type: 'node-red-theme' } const cssArray = [] const css = { css: cssArray } - const themeCSS = themeName + '.min.css' - const themeCustomCSS = themeName + '-custom.min.css' + const themeCSS = `${themeName}.min.css` + const themeCustomCSS = `${themeName}-custom.min.css` const scrollbarsCSS = 'common/scrollbars.min.css' const mermaidTheme = existsSync(path.join(themePath, `${themeName}-mermaid.json`)) ? JSON.parse(readFileSync(path.join(themePath, `${themeName}-mermaid.json`), 'utf-8')) : "dark" const mermaidOptions = { mermaid: { theme: mermaidTheme } } @@ -44,7 +44,7 @@ module.exports = function (RED) { cssScrollArray.push(path.join(themeRelativePath, themeCustomCSS)) RED.plugins.registerPlugin(themeName, Object.assign({}, type, css, mermaidOptions, monacoOptions)) - RED.plugins.registerPlugin(themeName + '-scroll', Object.assign({}, type, cssScroll, mermaidOptions, monacoOptions)) + RED.plugins.registerPlugin(`${themeName}-scroll`, Object.assign({}, type, cssScroll, mermaidOptions, monacoOptions)) }) RED.log.info(`Node-RED Contrib Theme Collection version: v${package.version}`) } \ No newline at end of file diff --git a/themes/aurora/aurora-custom.css b/themes/aurora/theme-custom.css similarity index 100% rename from themes/aurora/aurora-custom.css rename to themes/aurora/theme-custom.css diff --git a/themes/aurora/theme-mermaid.json b/themes/aurora/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/aurora/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/aurora/aurora-monaco.json b/themes/aurora/theme-monaco.json similarity index 100% rename from themes/aurora/aurora-monaco.json rename to themes/aurora/theme-monaco.json diff --git a/themes/aurora/aurora.scss b/themes/aurora/theme.scss similarity index 100% rename from themes/aurora/aurora.scss rename to themes/aurora/theme.scss diff --git a/themes/cobalt2/cobalt2-custom.css b/themes/cobalt2/theme-custom.css similarity index 100% rename from themes/cobalt2/cobalt2-custom.css rename to themes/cobalt2/theme-custom.css diff --git a/themes/cobalt2/theme-mermaid.json b/themes/cobalt2/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/cobalt2/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/cobalt2/cobalt2-monaco.json b/themes/cobalt2/theme-monaco.json similarity index 100% rename from themes/cobalt2/cobalt2-monaco.json rename to themes/cobalt2/theme-monaco.json diff --git a/themes/cobalt2/cobalt2.scss b/themes/cobalt2/theme.scss similarity index 100% rename from themes/cobalt2/cobalt2.scss rename to themes/cobalt2/theme.scss diff --git a/themes/dark/dark-custom.css b/themes/dark/theme-custom.css similarity index 100% rename from themes/dark/dark-custom.css rename to themes/dark/theme-custom.css diff --git a/themes/dark/theme-mermaid.json b/themes/dark/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/dark/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/dark/dark-monaco.json b/themes/dark/theme-monaco.json similarity index 100% rename from themes/dark/dark-monaco.json rename to themes/dark/theme-monaco.json diff --git a/themes/dark/dark.scss b/themes/dark/theme.scss similarity index 100% rename from themes/dark/dark.scss rename to themes/dark/theme.scss diff --git a/themes/dracula/dracula-custom.css b/themes/dracula/theme-custom.css similarity index 100% rename from themes/dracula/dracula-custom.css rename to themes/dracula/theme-custom.css diff --git a/themes/dracula/theme-mermaid.json b/themes/dracula/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/dracula/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/dracula/dracula-monaco.json b/themes/dracula/theme-monaco.json similarity index 100% rename from themes/dracula/dracula-monaco.json rename to themes/dracula/theme-monaco.json diff --git a/themes/dracula/dracula.scss b/themes/dracula/theme.scss similarity index 100% rename from themes/dracula/dracula.scss rename to themes/dracula/theme.scss diff --git a/themes/espresso-libre/espresso-libre-custom.css b/themes/espresso-libre/theme-custom.css similarity index 100% rename from themes/espresso-libre/espresso-libre-custom.css rename to themes/espresso-libre/theme-custom.css diff --git a/themes/espresso-libre/theme-mermaid.json b/themes/espresso-libre/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/espresso-libre/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/espresso-libre/espresso-libre-monaco.json b/themes/espresso-libre/theme-monaco.json similarity index 100% rename from themes/espresso-libre/espresso-libre-monaco.json rename to themes/espresso-libre/theme-monaco.json diff --git a/themes/espresso-libre/espresso-libre.scss b/themes/espresso-libre/theme.scss similarity index 100% rename from themes/espresso-libre/espresso-libre.scss rename to themes/espresso-libre/theme.scss diff --git a/themes/github-dark-default/github-dark-default-custom.css b/themes/github-dark-default/theme-custom.css similarity index 100% rename from themes/github-dark-default/github-dark-default-custom.css rename to themes/github-dark-default/theme-custom.css diff --git a/themes/github-dark-default/theme-mermaid.json b/themes/github-dark-default/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/github-dark-default/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/github-dark-default/github-dark-default-monaco.json b/themes/github-dark-default/theme-monaco.json similarity index 100% rename from themes/github-dark-default/github-dark-default-monaco.json rename to themes/github-dark-default/theme-monaco.json diff --git a/themes/github-dark-default/github-dark-default.scss b/themes/github-dark-default/theme.scss similarity index 100% rename from themes/github-dark-default/github-dark-default.scss rename to themes/github-dark-default/theme.scss diff --git a/themes/github-dark-dimmed/github-dark-dimmed-custom.css b/themes/github-dark-dimmed/theme-custom.css similarity index 100% rename from themes/github-dark-dimmed/github-dark-dimmed-custom.css rename to themes/github-dark-dimmed/theme-custom.css diff --git a/themes/github-dark-dimmed/theme-mermaid.json b/themes/github-dark-dimmed/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/github-dark-dimmed/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/github-dark-dimmed/github-dark-dimmed-monaco.json b/themes/github-dark-dimmed/theme-monaco.json similarity index 100% rename from themes/github-dark-dimmed/github-dark-dimmed-monaco.json rename to themes/github-dark-dimmed/theme-monaco.json diff --git a/themes/github-dark-dimmed/github-dark-dimmed.scss b/themes/github-dark-dimmed/theme.scss similarity index 100% rename from themes/github-dark-dimmed/github-dark-dimmed.scss rename to themes/github-dark-dimmed/theme.scss diff --git a/themes/github-dark/github-dark-custom.css b/themes/github-dark/theme-custom.css similarity index 100% rename from themes/github-dark/github-dark-custom.css rename to themes/github-dark/theme-custom.css diff --git a/themes/github-dark/theme-mermaid.json b/themes/github-dark/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/github-dark/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/github-dark/github-dark-monaco.json b/themes/github-dark/theme-monaco.json similarity index 100% rename from themes/github-dark/github-dark-monaco.json rename to themes/github-dark/theme-monaco.json diff --git a/themes/github-dark/github-dark.scss b/themes/github-dark/theme.scss similarity index 100% rename from themes/github-dark/github-dark.scss rename to themes/github-dark/theme.scss diff --git a/themes/midnight-red/midnight-red-custom.css b/themes/midnight-red/theme-custom.css similarity index 100% rename from themes/midnight-red/midnight-red-custom.css rename to themes/midnight-red/theme-custom.css diff --git a/themes/midnight-red/theme-mermaid.json b/themes/midnight-red/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/midnight-red/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/midnight-red/midnight-red-monaco.json b/themes/midnight-red/theme-monaco.json similarity index 100% rename from themes/midnight-red/midnight-red-monaco.json rename to themes/midnight-red/theme-monaco.json diff --git a/themes/midnight-red/midnight-red.scss b/themes/midnight-red/theme.scss similarity index 100% rename from themes/midnight-red/midnight-red.scss rename to themes/midnight-red/theme.scss diff --git a/themes/monoindustrial/monoindustrial-custom.css b/themes/monoindustrial/theme-custom.css similarity index 100% rename from themes/monoindustrial/monoindustrial-custom.css rename to themes/monoindustrial/theme-custom.css diff --git a/themes/monoindustrial/theme-mermaid.json b/themes/monoindustrial/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/monoindustrial/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/monoindustrial/monoindustrial-monaco.json b/themes/monoindustrial/theme-monaco.json similarity index 100% rename from themes/monoindustrial/monoindustrial-monaco.json rename to themes/monoindustrial/theme-monaco.json diff --git a/themes/monoindustrial/monoindustrial.scss b/themes/monoindustrial/theme.scss similarity index 100% rename from themes/monoindustrial/monoindustrial.scss rename to themes/monoindustrial/theme.scss diff --git a/themes/monokai-dimmed/monokai-dimmed-custom.css b/themes/monokai-dimmed/theme-custom.css similarity index 100% rename from themes/monokai-dimmed/monokai-dimmed-custom.css rename to themes/monokai-dimmed/theme-custom.css diff --git a/themes/monokai-dimmed/theme-mermaid.json b/themes/monokai-dimmed/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/monokai-dimmed/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/monokai-dimmed/monokai-dimmed-monaco.json b/themes/monokai-dimmed/theme-monaco.json similarity index 100% rename from themes/monokai-dimmed/monokai-dimmed-monaco.json rename to themes/monokai-dimmed/theme-monaco.json diff --git a/themes/monokai-dimmed/monokai-dimmed.scss b/themes/monokai-dimmed/theme.scss similarity index 100% rename from themes/monokai-dimmed/monokai-dimmed.scss rename to themes/monokai-dimmed/theme.scss diff --git a/themes/monokai/monokai-custom.css b/themes/monokai/theme-custom.css similarity index 100% rename from themes/monokai/monokai-custom.css rename to themes/monokai/theme-custom.css diff --git a/themes/monokai/theme-mermaid.json b/themes/monokai/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/monokai/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/monokai/monokai-monaco.json b/themes/monokai/theme-monaco.json similarity index 100% rename from themes/monokai/monokai-monaco.json rename to themes/monokai/theme-monaco.json diff --git a/themes/monokai/monokai.scss b/themes/monokai/theme.scss similarity index 100% rename from themes/monokai/monokai.scss rename to themes/monokai/theme.scss diff --git a/themes/noctis/noctis-custom.css b/themes/noctis/theme-custom.css similarity index 100% rename from themes/noctis/noctis-custom.css rename to themes/noctis/theme-custom.css diff --git a/themes/noctis/theme-mermaid.json b/themes/noctis/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/noctis/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/noctis/noctis-monaco.json b/themes/noctis/theme-monaco.json similarity index 100% rename from themes/noctis/noctis-monaco.json rename to themes/noctis/theme-monaco.json diff --git a/themes/noctis/noctis.scss b/themes/noctis/theme.scss similarity index 100% rename from themes/noctis/noctis.scss rename to themes/noctis/theme.scss diff --git a/themes/oceanic-next/oceanic-next-custom.css b/themes/oceanic-next/theme-custom.css similarity index 100% rename from themes/oceanic-next/oceanic-next-custom.css rename to themes/oceanic-next/theme-custom.css diff --git a/themes/oceanic-next/theme-mermaid.json b/themes/oceanic-next/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/oceanic-next/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/oceanic-next/oceanic-next-monaco.json b/themes/oceanic-next/theme-monaco.json similarity index 100% rename from themes/oceanic-next/oceanic-next-monaco.json rename to themes/oceanic-next/theme-monaco.json diff --git a/themes/oceanic-next/oceanic-next.scss b/themes/oceanic-next/theme.scss similarity index 100% rename from themes/oceanic-next/oceanic-next.scss rename to themes/oceanic-next/theme.scss diff --git a/themes/oled/oled-custom.css b/themes/oled/theme-custom.css similarity index 100% rename from themes/oled/oled-custom.css rename to themes/oled/theme-custom.css diff --git a/themes/oled/theme-mermaid.json b/themes/oled/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/oled/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/oled/oled-monaco.json b/themes/oled/theme-monaco.json similarity index 100% rename from themes/oled/oled-monaco.json rename to themes/oled/theme-monaco.json diff --git a/themes/oled/oled.scss b/themes/oled/theme.scss similarity index 100% rename from themes/oled/oled.scss rename to themes/oled/theme.scss diff --git a/themes/one-dark-pro-darker/one-dark-pro-darker-custom.css b/themes/one-dark-pro-darker/theme-custom.css similarity index 100% rename from themes/one-dark-pro-darker/one-dark-pro-darker-custom.css rename to themes/one-dark-pro-darker/theme-custom.css diff --git a/themes/one-dark-pro-darker/theme-mermaid.json b/themes/one-dark-pro-darker/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/one-dark-pro-darker/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/one-dark-pro-darker/one-dark-pro-darker-monaco.json b/themes/one-dark-pro-darker/theme-monaco.json similarity index 100% rename from themes/one-dark-pro-darker/one-dark-pro-darker-monaco.json rename to themes/one-dark-pro-darker/theme-monaco.json diff --git a/themes/one-dark-pro-darker/one-dark-pro-darker.scss b/themes/one-dark-pro-darker/theme.scss similarity index 100% rename from themes/one-dark-pro-darker/one-dark-pro-darker.scss rename to themes/one-dark-pro-darker/theme.scss diff --git a/themes/one-dark-pro/one-dark-pro-custom.css b/themes/one-dark-pro/theme-custom.css similarity index 100% rename from themes/one-dark-pro/one-dark-pro-custom.css rename to themes/one-dark-pro/theme-custom.css diff --git a/themes/one-dark-pro/theme-mermaid.json b/themes/one-dark-pro/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/one-dark-pro/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/one-dark-pro/one-dark-pro-monaco.json b/themes/one-dark-pro/theme-monaco.json similarity index 100% rename from themes/one-dark-pro/one-dark-pro-monaco.json rename to themes/one-dark-pro/theme-monaco.json diff --git a/themes/one-dark-pro/one-dark-pro.scss b/themes/one-dark-pro/theme.scss similarity index 100% rename from themes/one-dark-pro/one-dark-pro.scss rename to themes/one-dark-pro/theme.scss diff --git a/themes/solarized-dark/solarized-dark-custom.css b/themes/solarized-dark/theme-custom.css similarity index 100% rename from themes/solarized-dark/solarized-dark-custom.css rename to themes/solarized-dark/theme-custom.css diff --git a/themes/solarized-dark/theme-mermaid.json b/themes/solarized-dark/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/solarized-dark/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/solarized-dark/solarized-dark-monaco.json b/themes/solarized-dark/theme-monaco.json similarity index 100% rename from themes/solarized-dark/solarized-dark-monaco.json rename to themes/solarized-dark/theme-monaco.json diff --git a/themes/solarized-dark/solarized-dark.scss b/themes/solarized-dark/theme.scss similarity index 100% rename from themes/solarized-dark/solarized-dark.scss rename to themes/solarized-dark/theme.scss diff --git a/themes/solarized-light/solarized-light-custom.css b/themes/solarized-light/theme-custom.css similarity index 100% rename from themes/solarized-light/solarized-light-custom.css rename to themes/solarized-light/theme-custom.css diff --git a/themes/solarized-light/solarized-light-mermaid.json b/themes/solarized-light/theme-mermaid.json similarity index 100% rename from themes/solarized-light/solarized-light-mermaid.json rename to themes/solarized-light/theme-mermaid.json diff --git a/themes/solarized-light/solarized-light-monaco.json b/themes/solarized-light/theme-monaco.json similarity index 100% rename from themes/solarized-light/solarized-light-monaco.json rename to themes/solarized-light/theme-monaco.json diff --git a/themes/solarized-light/solarized-light.scss b/themes/solarized-light/theme.scss similarity index 100% rename from themes/solarized-light/solarized-light.scss rename to themes/solarized-light/theme.scss diff --git a/themes/tokyo-night-light/tokyo-night-light-custom.css b/themes/tokyo-night-light/theme-custom.css similarity index 100% rename from themes/tokyo-night-light/tokyo-night-light-custom.css rename to themes/tokyo-night-light/theme-custom.css diff --git a/themes/tokyo-night-light/tokyo-night-light-mermaid.json b/themes/tokyo-night-light/theme-mermaid.json similarity index 100% rename from themes/tokyo-night-light/tokyo-night-light-mermaid.json rename to themes/tokyo-night-light/theme-mermaid.json diff --git a/themes/tokyo-night-light/tokyo-night-light-monaco.json b/themes/tokyo-night-light/theme-monaco.json similarity index 100% rename from themes/tokyo-night-light/tokyo-night-light-monaco.json rename to themes/tokyo-night-light/theme-monaco.json diff --git a/themes/tokyo-night-light/tokyo-night-light.scss b/themes/tokyo-night-light/theme.scss similarity index 100% rename from themes/tokyo-night-light/tokyo-night-light.scss rename to themes/tokyo-night-light/theme.scss diff --git a/themes/tokyo-night-storm/tokyo-night-storm-custom.css b/themes/tokyo-night-storm/theme-custom.css similarity index 100% rename from themes/tokyo-night-storm/tokyo-night-storm-custom.css rename to themes/tokyo-night-storm/theme-custom.css diff --git a/themes/tokyo-night-storm/theme-mermaid.json b/themes/tokyo-night-storm/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/tokyo-night-storm/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/tokyo-night-storm/tokyo-night-storm-monaco.json b/themes/tokyo-night-storm/theme-monaco.json similarity index 100% rename from themes/tokyo-night-storm/tokyo-night-storm-monaco.json rename to themes/tokyo-night-storm/theme-monaco.json diff --git a/themes/tokyo-night-storm/tokyo-night-storm.scss b/themes/tokyo-night-storm/theme.scss similarity index 100% rename from themes/tokyo-night-storm/tokyo-night-storm.scss rename to themes/tokyo-night-storm/theme.scss diff --git a/themes/tokyo-night/tokyo-night-custom.css b/themes/tokyo-night/theme-custom.css similarity index 100% rename from themes/tokyo-night/tokyo-night-custom.css rename to themes/tokyo-night/theme-custom.css diff --git a/themes/tokyo-night/theme-mermaid.json b/themes/tokyo-night/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/tokyo-night/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/tokyo-night/tokyo-night-monaco.json b/themes/tokyo-night/theme-monaco.json similarity index 100% rename from themes/tokyo-night/tokyo-night-monaco.json rename to themes/tokyo-night/theme-monaco.json diff --git a/themes/tokyo-night/tokyo-night.scss b/themes/tokyo-night/theme.scss similarity index 100% rename from themes/tokyo-night/tokyo-night.scss rename to themes/tokyo-night/theme.scss diff --git a/themes/totallyinformation/totallyinformation-custom.css b/themes/totallyinformation/theme-custom.css similarity index 100% rename from themes/totallyinformation/totallyinformation-custom.css rename to themes/totallyinformation/theme-custom.css diff --git a/themes/totallyinformation/totallyinformation-mermaid.json b/themes/totallyinformation/theme-mermaid.json similarity index 100% rename from themes/totallyinformation/totallyinformation-mermaid.json rename to themes/totallyinformation/theme-mermaid.json diff --git a/themes/totallyinformation/totallyinformation-monaco.json b/themes/totallyinformation/theme-monaco.json similarity index 100% rename from themes/totallyinformation/totallyinformation-monaco.json rename to themes/totallyinformation/theme-monaco.json diff --git a/themes/totallyinformation/totallyinformation.scss b/themes/totallyinformation/theme.scss similarity index 100% rename from themes/totallyinformation/totallyinformation.scss rename to themes/totallyinformation/theme.scss diff --git a/themes/zenburn/zenburn-custom.css b/themes/zenburn/theme-custom.css similarity index 100% rename from themes/zenburn/zenburn-custom.css rename to themes/zenburn/theme-custom.css diff --git a/themes/zenburn/theme-mermaid.json b/themes/zenburn/theme-mermaid.json new file mode 100644 index 0000000..556d0e3 --- /dev/null +++ b/themes/zenburn/theme-mermaid.json @@ -0,0 +1 @@ +"dark" \ No newline at end of file diff --git a/themes/zenburn/zenburn-monaco.json b/themes/zenburn/theme-monaco.json similarity index 100% rename from themes/zenburn/zenburn-monaco.json rename to themes/zenburn/theme-monaco.json diff --git a/themes/zenburn/zenburn.scss b/themes/zenburn/theme.scss similarity index 100% rename from themes/zenburn/zenburn.scss rename to themes/zenburn/theme.scss