Skip to content

Commit 426ad9c

Browse files
authored
Merge pull request #64 from BeeInventor/develop
Develop
2 parents 02de000 + 7a6c989 commit 426ad9c

27 files changed

+11853
-37664
lines changed

.eslintrc.js

+7-15
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,18 @@ module.exports = {
22
parser: '@typescript-eslint/parser',
33
parserOptions: {
44
project: 'tsconfig.json',
5-
sourceType: 'module',
5+
sourceType: 'module'
66
},
77
plugins: ['@typescript-eslint/eslint-plugin'],
8-
extends: [
9-
'plugin:@typescript-eslint/recommended',
10-
'plugin:prettier/recommended',
11-
],
8+
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', 'plugin:storybook/recommended'],
129
root: true,
1310
env: {
1411
node: true,
15-
jest: true,
12+
jest: true
1613
},
17-
ignorePatterns: [
18-
'.eslintrc.js',
19-
'lib/**/*.js',
20-
'lib/**/*.ts',
21-
'rollup.config.js',
22-
],
14+
ignorePatterns: ['.eslintrc.js', 'lib/**/*.js', 'lib/**/*.ts', 'rollup.config.js'],
2315
rules: {
2416
'@typescript-eslint/no-explicit-any': 'off',
25-
'@typescript-eslint/no-empty-function': 'off',
26-
},
27-
};
17+
'@typescript-eslint/no-empty-function': 'off'
18+
}
19+
};

.storybook/main.js

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
const path = require('path');
22
const toPath = (filePath) => path.join(process.cwd(), filePath);
3+
const { mergeConfig } = require('vite');
34

45
module.exports = {
56
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
67
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
8+
core: {
9+
builder: '@storybook/builder-vite',
10+
},
711
typescript: {
812
check: false,
913
checkOptions: {},
@@ -14,17 +18,18 @@ module.exports = {
1418
prop.parent ? !/node_modules/.test(prop.parent.fileName) : true,
1519
},
1620
},
17-
webpackFinal: async (config) => {
18-
return {
19-
...config,
20-
resolve: {
21-
...config.resolve,
22-
alias: {
23-
...config.resolve.alias,
24-
'@emotion/core': toPath('node_modules/@emotion/react'),
25-
'emotion-theming': toPath('node_modules/@emotion/react'),
26-
},
21+
viteFinal: async (config) => {
22+
return mergeConfig(config, {
23+
optimizeDeps: {
24+
include: ['storybook-dark-mode'],
2725
},
28-
};
26+
});
27+
},
28+
framework: {
29+
name: '@storybook/react-webpack5',
30+
options: {},
31+
},
32+
docs: {
33+
autodocs: true,
2934
},
3035
};
File renamed without changes.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
1. Install packages
66

77
```sh
8-
npm install
8+
pnpm install
99
```
1010

1111
2. Open Storybook
1212

1313
```sh
14-
npm run storybook
14+
pnpm run storybook
1515
```
1616

1717
## Usage
@@ -31,7 +31,7 @@ npm run storybook
3131
3. Run
3232

3333
```sh
34-
yarn add @beeinventor/dasiot-react-component-lib
34+
pnpm add @beeinventor/dasiot-react-component-lib
3535
```
3636

3737
### Import Component

0 commit comments

Comments
 (0)