build: update all deps and migrate to biome
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
dist
|
||||
data
|
||||
auto_update
|
||||
@@ -1 +0,0 @@
|
||||
spine-player.css
|
||||
@@ -1,29 +0,0 @@
|
||||
import baseConfig from '@aklive2d/eslint-config'
|
||||
import { tsConfig } from '@aklive2d/eslint-config'
|
||||
import tseslint from 'typescript-eslint'
|
||||
import globals from 'globals'
|
||||
|
||||
/** @type {import('eslint').Config} */
|
||||
export default tseslint.config(
|
||||
...baseConfig,
|
||||
...tsConfig,
|
||||
{
|
||||
ignores: ['dist', 'spine-ts'],
|
||||
},
|
||||
{
|
||||
files: ['**/*.js', '**/*.ts'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2022,
|
||||
globals: {
|
||||
...globals.browser,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{ argsIgnorePattern: '^_' },
|
||||
],
|
||||
},
|
||||
}
|
||||
)
|
||||
@@ -9,24 +9,20 @@
|
||||
"build": "mode=build bun runner.ts",
|
||||
"build:directory": "mode=build:directory bun runner.ts",
|
||||
"preview:showcase": "bunx --bun vite preview",
|
||||
"lint": "eslint && prettier --check ."
|
||||
"lint": "biome lint --write .",
|
||||
"lint:fix": "biome check --write ."
|
||||
},
|
||||
"peerDependencies": {
|
||||
"globals": ">=16.0.0",
|
||||
"typescript-eslint": ">=8.31.1",
|
||||
"typescript": ">=5.8.2"
|
||||
"typescript": ">=5.9.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite": "^6.1.5",
|
||||
"@aklive2d/eslint-config": "workspace:*",
|
||||
"vite": "^7.1.9",
|
||||
"@aklive2d/postcss-config": "workspace:*",
|
||||
"@aklive2d/stylelint-config": "workspace:*",
|
||||
"@aklive2d/config": "workspace:*",
|
||||
"@aklive2d/libs": "workspace:*",
|
||||
"@aklive2d/assets": "workspace:*",
|
||||
"@aklive2d/operator": "workspace:*",
|
||||
"@aklive2d/vite-helpers": "workspace:*",
|
||||
"@aklive2d/module": "workspace:*",
|
||||
"@aklive2d/prettier-config": "workspace:*"
|
||||
"@aklive2d/module": "workspace:*"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import baseConfig from '@aklive2d/prettier-config'
|
||||
|
||||
/**
|
||||
* @type {import("prettier").Config}
|
||||
*/
|
||||
const config = {
|
||||
...baseConfig,
|
||||
semi: false,
|
||||
}
|
||||
|
||||
export default config
|
||||
@@ -1,8 +1,8 @@
|
||||
import path from 'node:path'
|
||||
import { build as viteBuild } from 'vite'
|
||||
import operators from '@aklive2d/operator'
|
||||
import { envParser, file } from '@aklive2d/libs'
|
||||
import { copyShowcaseData, copyProjectJSON } from '@aklive2d/vite-helpers'
|
||||
import operators from '@aklive2d/operator'
|
||||
import { copyProjectJSON, copyShowcaseData } from '@aklive2d/vite-helpers'
|
||||
import { build as viteBuild } from 'vite'
|
||||
import * as dirs from './index.js'
|
||||
|
||||
const build = async (namesToBuild: string[], mode: string) => {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import Voice from '@/components/voice'
|
||||
import Fallback from '@/components/fallback'
|
||||
import Music from '@/components/music'
|
||||
import Player from '@/components/player'
|
||||
import Background from '@/components/background'
|
||||
import Logo from '@/components/logo'
|
||||
import Insight from '@/components/insight'
|
||||
import Events from '@/components/events'
|
||||
import Fallback from '@/components/fallback'
|
||||
import {
|
||||
isWebGLSupported,
|
||||
insertHTMLChild,
|
||||
addEventListeners,
|
||||
insertHTMLChild,
|
||||
isWebGLSupported,
|
||||
updateElementPosition,
|
||||
} from '@/components/helper'
|
||||
import Insight from '@/components/insight'
|
||||
import Logo from '@/components/logo'
|
||||
import Music from '@/components/music'
|
||||
import Player from '@/components/player'
|
||||
import Voice from '@/components/voice'
|
||||
import '@/components/aklive2d.css'
|
||||
|
||||
export default class AKLive2D {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
insertHTMLChild,
|
||||
readFile,
|
||||
updateHTMLOptions,
|
||||
showRelatedHTML,
|
||||
syncHTMLValue,
|
||||
insertHTMLChild,
|
||||
updateHTMLOptions,
|
||||
} from '@/components/helper'
|
||||
import '@/components/background.css'
|
||||
import buildConfig from '!/config.json'
|
||||
|
||||
@@ -83,9 +83,9 @@ export const syncHTMLValue = (source, targetID) => {
|
||||
document.getElementById(targetID).value = source.value
|
||||
}
|
||||
|
||||
export const readFile = (file, callback = () => {}) => {
|
||||
export const readFile = (file, callback = null) => {
|
||||
if (!file) return
|
||||
callback(URL.createObjectURL(file.slice()), file.type)
|
||||
callback && callback(URL.createObjectURL(file.slice()), file.type)
|
||||
}
|
||||
|
||||
export const createCustomEvent = (name, withArg = false) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createCustomEvent } from '@/components/helper'
|
||||
import buildConfig from '!/config.json'
|
||||
import { createCustomEvent } from '@/components/helper'
|
||||
|
||||
export default class Insight {
|
||||
#isInsightInited = false
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
insertHTMLChild,
|
||||
updateElementPosition,
|
||||
readFile,
|
||||
showRelatedHTML,
|
||||
syncHTMLValue,
|
||||
updateElementPosition,
|
||||
} from '@/components/helper'
|
||||
import '@/components/logo.css'
|
||||
import buildConfig from '!/config.json'
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import buildConfig from '!/config.json'
|
||||
import {
|
||||
getCurrentHTMLOptions,
|
||||
insertHTMLChild,
|
||||
updateHTMLOptions,
|
||||
readFile,
|
||||
showRelatedHTML,
|
||||
syncHTMLValue,
|
||||
readFile,
|
||||
getCurrentHTMLOptions,
|
||||
updateHTMLOptions,
|
||||
} from '@/components/helper'
|
||||
import buildConfig from '!/config.json'
|
||||
|
||||
export default class Music {
|
||||
#el = document.createElement('div')
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Player as SpinePlayer } from '@aklive2d/module'
|
||||
import {
|
||||
createCustomEvent,
|
||||
insertHTMLChild,
|
||||
updateHTMLOptions,
|
||||
showRelatedHTML,
|
||||
syncHTMLValue,
|
||||
createCustomEvent,
|
||||
updateHTMLOptions,
|
||||
} from '@/components/helper'
|
||||
import { Player as SpinePlayer } from '@aklive2d/module'
|
||||
import '@/components/player.css'
|
||||
import buildConfig from '!/config.json'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@import 'https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Sans+KR:wght@400;500;700&family=Noto+Sans+SC:wght@400;500;700&family=Noto+Sans:wght@400;500;700&display=swap';
|
||||
@import "https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Sans+KR:wght@400;500;700&family=Noto+Sans+SC:wght@400;500;700&family=Noto+Sans:wght@400;500;700&display=swap";
|
||||
|
||||
#voice-box {
|
||||
position: fixed;
|
||||
@@ -9,7 +9,7 @@
|
||||
opacity: 0;
|
||||
margin: 16px;
|
||||
font-family:
|
||||
'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans', sans-serif;
|
||||
"Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans", sans-serif;
|
||||
transition: opacity 0.5s cubic-bezier(0.65, 0.05, 0.36, 1);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
background-color: rgb(0 0 0);
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAXCAYAAAAGAx/kAAACGElEQVQ4jY2UO4sUQRSFv+6e3hkf6yqi62LiD1DRwGRFZDUTRTAVMTHzHxhosBgr+IhMzIXFRzKJYiQoCLqroYGCgiDK6K6z8+hj0Kd2yrZn8EJRza06X91761Ynkphgh4ETwBB4BrwZu1NS3WhJui1pTSNblXTLa/9oxoEWNd4W/xc0K6kzAfRd0lxV16jJdg6YBtaAB8AvoPA4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XwFPgErAVuEjZGkNgkEhKDco9bwOuG/Ac+OS67ANOGngV+OYDewEUqt+gvLWmxxHgFHDapz52fV4C64Z3PW+AUsPyCJYCP4FHPuQMsNlRrHv0DRo2XP3Ccw/4Tdl8U2GTb6trYYimYNQ6Gw0pYDuwn1E7hJR3W3TMvp5hKbAM/IC/n8hR4L6hqSPJGT3QjPIfFX4nDeAC8CIGhTrBqNsz16plWN/R9KJShGzUiCBBnFS+FYmCP41gBaA/cImMsTl24NIAAAAASUVORK5CYII=");
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
insertHTMLChild,
|
||||
updateElementPosition,
|
||||
updateHTMLOptions,
|
||||
showRelatedHTML,
|
||||
syncHTMLValue,
|
||||
updateElementPosition,
|
||||
updateHTMLOptions,
|
||||
} from '@/components/helper'
|
||||
import '@/components/voice.css'
|
||||
import buildConfig from '!/config.json'
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import baseConfig from '@aklive2d/stylelint-config'
|
||||
/** @type {import('stylelint').Config} */
|
||||
export default {
|
||||
...baseConfig,
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import path from 'node:path'
|
||||
import { has } from '@aklive2d/operator'
|
||||
import { envParser, file } from '@aklive2d/libs'
|
||||
import { has } from '@aklive2d/operator'
|
||||
import { copyShowcaseData } from '@aklive2d/vite-helpers'
|
||||
import { defineConfig } from 'vite'
|
||||
import * as dirs from './index.js'
|
||||
|
||||
// https://vite.dev/config/
|
||||
|
||||
Reference in New Issue
Block a user