forked from wansenai/flow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fetch: Remove Theme Configuration wansenai#22
- Loading branch information
Showing
9 changed files
with
133 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,15 @@ | ||
/* eslint-env node */ | ||
require('@rushstack/eslint-patch/modern-module-resolution') | ||
|
||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
es6: true, | ||
}, | ||
parser: 'vue-eslint-parser', | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
jsxPragma: 'React', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
extends: [ | ||
'plugin:vue/vue3-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
'extends': [ | ||
'plugin:vue/vue3-essential', | ||
'eslint:recommended', | ||
'@vue/eslint-config-typescript', | ||
'@vue/eslint-config-prettier/skip-formatting' | ||
], | ||
rules: { | ||
'vue/script-setup-uses-vars': 'error', | ||
'@typescript-eslint/ban-ts-ignore': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'vue/custom-event-name-casing': 'off', | ||
'no-use-before-define': 'off', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/ban-types': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
}, | ||
], | ||
'no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
}, | ||
], | ||
'space-before-function-paren': 'off', | ||
|
||
'vue/attributes-order': 'off', | ||
'vue/one-component-per-file': 'off', | ||
'vue/html-closing-bracket-newline': 'off', | ||
'vue/max-attributes-per-line': 'off', | ||
'vue/multiline-html-element-content-newline': 'off', | ||
'vue/singleline-html-element-content-newline': 'off', | ||
'vue/attribute-hyphenation': 'off', | ||
'vue/require-default-prop': 'off', | ||
'vue/require-explicit-emits': 'off', | ||
'vue/html-self-closing': [ | ||
'error', | ||
{ | ||
html: { | ||
void: 'always', | ||
normal: 'never', | ||
component: 'always', | ||
}, | ||
svg: 'always', | ||
math: 'always', | ||
}, | ||
], | ||
'vue/multi-word-component-names': 'off', | ||
}, | ||
}; | ||
parserOptions: { | ||
ecmaVersion: 'latest' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,110 @@ | ||
node_modules | ||
.DS_Store | ||
dist | ||
.npmrc | ||
.cache | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
tests/server/static | ||
tests/server/static/upload | ||
# nyc test coverage | ||
.nyc_output | ||
|
||
.local | ||
# local env files | ||
.env.local | ||
.env.*.local | ||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Editor directories and files | ||
.idea | ||
# .vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
package-lock.json | ||
pnpm-lock.yaml | ||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
.history | ||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# vscode private configuration file | ||
.vscode/redis.json | ||
|
||
.idea | ||
|
||
!**/form-making/dist/ | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
/dist/* | ||
.local | ||
.output.js | ||
/node_modules/** | ||
|
||
**/*.svg | ||
**/*.sh | ||
|
||
/public/* | ||
public-hoist-pattern[]=*eslint* | ||
public-hoist-pattern[]=*prettier* | ||
public-hoist-pattern[]=lint-staged | ||
public-hoist-pattern[]=*stylelint* | ||
public-hoist-pattern[]=@commitlint/cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1 @@ | ||
import { getThemeColors, generateColors } from '../../../build/config/themeConfig'; | ||
|
||
import { replaceStyleVariables } from 'vite-plugin-theme/es/client'; | ||
import { mixLighten, mixDarken, tinycolor } from 'vite-plugin-theme/es/colorUtils'; | ||
|
||
export async function changeTheme(color: string) { | ||
const colors = generateColors({ | ||
mixDarken, | ||
mixLighten, | ||
tinycolor, | ||
color, | ||
}); | ||
|
||
return await replaceStyleVariables({ | ||
colorVariables: [...getThemeColors(color), ...colors], | ||
}); | ||
} | ||
export async function changeTheme(_color: string) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters