Skip to content

Commit

Permalink
chore: 依赖更新
Browse files Browse the repository at this point in the history
  • Loading branch information
z9956 committed Oct 10, 2023
1 parent a5775e9 commit 90768db
Show file tree
Hide file tree
Showing 8 changed files with 3,982 additions and 4,166 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "prettier",
"extends": ["plugin:storybook/recommended", "prettier"],
"env": {
"es6": true
},
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
pnpm test
42 changes: 0 additions & 42 deletions .storybook/main.js

This file was deleted.

35 changes: 35 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import type { StorybookConfig } from '@storybook/react-vite';

import { join, dirname } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}
const config: StorybookConfig = {
stories: [
// '../stories/**/*.mdx',
// '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)',
'../packages/components/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
getAbsolutePath('@storybook/addon-actions'),
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-a11y'),
getAbsolutePath('@storybook/addon-docs'),
getAbsolutePath('@storybook/addon-controls'),
getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
name: getAbsolutePath('@storybook/react-vite'),
options: {},
},
docs: {
autodocs: 'tag',
},
};
export default config;
5 changes: 3 additions & 2 deletions .storybook/preview.js → .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type { import('@storybook/react').Preview } */
const preview = {
import type { Preview } from '@storybook/react';

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
Expand Down
74 changes: 35 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,57 @@
"scripts": {
"dev": "turbo run dev --filter=!./examples/*",
"build": "turbo run build --filter=!./examples/*",
"storybook": "storybook dev -p 9000",
"build-storybook": "storybook build -c .storybook -o dist",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"lint": "pnpm lint:prettier && pnpm lint:eslint",
"lint:prettier": "prettier --write packages/components --cache",
"lint:eslint": "eslint packages/components --ext .ts,.tsx --config .eslintrc --cache",
"prepare": "husky install",
"test": "pnpm jest"
},
"dependencies": {
"@emotion/css": "^11.10.0",
"@emotion/css": "^11.11.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.3.1",
"react-icons": "^4.11.0",
"react-transition-group": "^4.4.5"
},
"devDependencies": {
"@babel/core": "^7.21.4",
"@emotion/react": "^11.10.4",
"@storybook/addon-a11y": "^7.0.4",
"@storybook/addon-actions": "^7.0.4",
"@storybook/addon-controls": "^7.0.4",
"@storybook/addon-docs": "^7.0.4",
"@storybook/addon-essentials": "^7.0.4",
"@storybook/addon-interactions": "^7.0.4",
"@storybook/addon-links": "^7.0.4",
"@storybook/blocks": "^7.0.4",
"@storybook/builder-vite": "^7.0.4",
"@storybook/react": "^7.0.4",
"@storybook/react-webpack5": "^7.0.4",
"@storybook/testing-library": "^0.1.0",
"@swc/core": "^1.3.89",
"@storybook/addon-a11y": "^7.4.6",
"@storybook/addon-actions": "^7.4.6",
"@storybook/addon-controls": "^7.4.6",
"@storybook/addon-docs": "^7.4.6",
"@storybook/addon-essentials": "^7.4.6",
"@storybook/addon-interactions": "^7.4.6",
"@storybook/addon-links": "^7.4.6",
"@storybook/addon-onboarding": "1.0.8",
"@storybook/blocks": "^7.4.6",
"@storybook/react": "^7.4.6",
"@storybook/react-vite": "7.4.6",
"@storybook/testing-library": "^0.2.2",
"@swc/core": "^1.3.92",
"@swc/jest": "^0.2.29",
"@types/jest": "^29.5.1",
"@types/react": "^18.0.19",
"@types/react-dom": "^18.0.6",
"@types/react-test-renderer": "^18.0.0",
"@types/react-transition-group": "^4.4.4",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
"babel-jest": "^29.5.0",
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "^8.0.1",
"@types/jest": "^29.5.5",
"@types/react": "^18.2.27",
"@types/react-dom": "^18.2.12",
"@types/react-test-renderer": "^18.0.3",
"@types/react-transition-group": "^4.4.7",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.51.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-storybook": "^0.6.15",
"husky": "^8.0.3",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.5.0",
"lint-staged": "^13.0.3",
"prettier": "^2.4.1",
"react-docgen": "^5.4.3",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^13.3.0",
"prettier": "^2.8.8",
"react-test-renderer": "^18.2.0",
"storybook": "^7.0.4",
"ts-jest": "^29.1.1",
"storybook": "^7.4.6",
"turbo": "canary",
"typescript": "^4.8.3"
"typescript": "^4.9.5"
},
"pnpm": {
"overrides": {
Expand Down
Loading

0 comments on commit 90768db

Please sign in to comment.