mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 05:38:04 +00:00
feat: 支持 UNM rust
This commit is contained in:
parent
4d59401549
commit
4d54060a4f
29 changed files with 717 additions and 231 deletions
|
|
@ -37,6 +37,7 @@ const options = {
|
|||
'electron',
|
||||
'NeteaseCloudMusicApi',
|
||||
'better-sqlite3',
|
||||
'@unblockneteasemusic/rust-napi'
|
||||
],
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,30 +1,9 @@
|
|||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const colors = require('tailwindcss/colors')
|
||||
const { colord } = require('colord')
|
||||
const prettier = require('prettier')
|
||||
const fs = require('fs')
|
||||
const prettierConfig = require('../prettier.config.js')
|
||||
|
||||
const pickedColors = {
|
||||
blue: colors.blue,
|
||||
red: colors.red,
|
||||
orange: colors.orange,
|
||||
amber: colors.amber,
|
||||
yellow: colors.yellow,
|
||||
lime: colors.lime,
|
||||
green: colors.green,
|
||||
emerald: colors.emerald,
|
||||
teal: colors.teal,
|
||||
cyan: colors.cyan,
|
||||
sky: colors.sky,
|
||||
indigo: colors.indigo,
|
||||
violet: colors.violet,
|
||||
purple: colors.purple,
|
||||
fuchsia: colors.fuchsia,
|
||||
pink: colors.pink,
|
||||
rose: colors.rose,
|
||||
}
|
||||
module.exports = pickedColors
|
||||
const pickedColors = require('./pickedColors.js')
|
||||
|
||||
const colorsCss = {}
|
||||
Object.entries(pickedColors).forEach(([name, colors]) => {
|
||||
|
|
@ -47,4 +26,3 @@ ${name === 'blue' ? ':root' : `[data-accent-color='${name}']`} {${color}
|
|||
|
||||
const formatted = prettier.format(css, { ...prettierConfig, parser: 'css' })
|
||||
fs.writeFileSync('./src/renderer/styles/accentColor.scss', formatted)
|
||||
|
||||
|
|
|
|||
24
scripts/pickedColors.js
Normal file
24
scripts/pickedColors.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const colors = require('tailwindcss/colors')
|
||||
|
||||
const pickedColors = {
|
||||
blue: colors.blue,
|
||||
red: colors.red,
|
||||
orange: colors.orange,
|
||||
amber: colors.amber,
|
||||
yellow: colors.yellow,
|
||||
lime: colors.lime,
|
||||
green: colors.green,
|
||||
emerald: colors.emerald,
|
||||
teal: colors.teal,
|
||||
cyan: colors.cyan,
|
||||
sky: colors.sky,
|
||||
indigo: colors.indigo,
|
||||
violet: colors.violet,
|
||||
purple: colors.purple,
|
||||
fuchsia: colors.fuchsia,
|
||||
pink: colors.pink,
|
||||
rose: colors.rose,
|
||||
}
|
||||
|
||||
module.exports = pickedColors
|
||||
Loading…
Add table
Add a link
Reference in a new issue