feat: 支持 UNM rust

This commit is contained in:
qier222 2022-05-01 19:53:25 +08:00
parent 4d59401549
commit 4d54060a4f
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
29 changed files with 717 additions and 231 deletions

View file

@ -37,6 +37,7 @@ const options = {
'electron',
'NeteaseCloudMusicApi',
'better-sqlite3',
'@unblockneteasemusic/rust-napi'
],
}

View file

@ -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
View 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