yangkaixiang 1 year ago
parent
commit
d16e4bc36d
3 changed files with 4 additions and 6 deletions
  1. 1 2
      README.md
  2. 1 2
      package.json
  3. 2 2
      src/useDtTheme/index.jsx

+ 1 - 2
README.md

@@ -3,5 +3,4 @@ import { useDtTheme } from 'dt-theme';
 
 
 # 构建方法
-1、修改package.json中的版本号。
-2、Jenkins打包使用npm run pub1,本地打包推送使用npm run pub2。
+1、打包使用npm run pub1。

+ 1 - 2
package.json

@@ -1,6 +1,6 @@
 {
   "name": "dt-theme",
-  "version": "1.0.8",
+  "version": "1.0.9",
   "main": "lib/index.js",
   "dependencies": {
     "@testing-library/jest-dom": "^5.17.0",
@@ -15,7 +15,6 @@
     "test": "react-scripts test",
     "eject": "react-scripts eject",
     "pub1": "npx webpack --config webpack.config.js && npm publish",
-    "pub2": "npm version patch --no-git-tag-version && npx webpack --config webpack.config.js && npm publish",
     "prepare": "husky install"
   },
   "eslintConfig": {

+ 2 - 2
src/useDtTheme/index.jsx

@@ -6,11 +6,11 @@ import greenTheme from '@/style/green.js'
 import darkBlueTheme from '@/style/dark.js'
 
 const APP_THEME_CHANGEABLE_KEY = () => {
-  return isVite ? import.meta.env.VITE_APP_THEME_CHANGEABLE : process.env.REACT_APP_THEME_CHANGEABLE;
+  return isVite() ? import.meta.env.VITE_APP_THEME_CHANGEABLE : process.env.REACT_APP_THEME_CHANGEABLE;
 }
 
 const APP_THEME_KEY = () => {
-  return isVite ? import.meta.env.VITE_APP_THEME : process.env.REACT_APP_THEME;
+  return isVite() ? import.meta.env.VITE_APP_THEME : process.env.REACT_APP_THEME;
 }
 
 const themeKeys = (themeKey) => {