fix:test
This commit is contained in:
19
packages/bank-hooks/.fatherrc.ts
Normal file
19
packages/bank-hooks/.fatherrc.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { defineConfig } from 'father';
|
||||
|
||||
export default defineConfig({
|
||||
esm: { input: 'src', // 默认编译目录
|
||||
platform: 'browser', // 默认构建为 Browser 环境的产物
|
||||
transformer: 'babel', // 默认使用 babel 以提供更好的兼容性
|
||||
},
|
||||
|
||||
extraBabelPlugins: [
|
||||
[
|
||||
'babel-plugin-import',
|
||||
{
|
||||
libraryName: 'antd',
|
||||
libraryDirectory: 'es',
|
||||
style: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
});
|
||||
3
packages/bank-hooks/.gitignore
vendored
Normal file
3
packages/bank-hooks/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/node_modules
|
||||
/dist
|
||||
.DS_Store
|
||||
23
packages/bank-hooks/README.md
Normal file
23
packages/bank-hooks/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# @alipay/antbank-platform-ui
|
||||
|
||||
[](https://npmjs.org/package/@alipay/antbank-platform-ui)
|
||||
[](https://npmjs.org/package/@alipay/antbank-platform-ui)
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
$ yarn install
|
||||
```
|
||||
|
||||
```bash
|
||||
$ npm run dev
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
TODO
|
||||
|
||||
## LICENSE
|
||||
|
||||
MIT
|
||||
32
packages/bank-hooks/package.json
Normal file
32
packages/bank-hooks/package.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "@lishican/antbank-platform-hooks",
|
||||
"version": "0.0.4",
|
||||
"description": "",
|
||||
"module": "dist/esm/index.js",
|
||||
"types": "dist/esm/index.d.ts",
|
||||
"scripts": {
|
||||
"dev": "father dev",
|
||||
"build": "father build",
|
||||
"build:deps": "father prebundle",
|
||||
"prepublish": "npm run build"
|
||||
},
|
||||
"keywords": [],
|
||||
"authors": [],
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist",
|
||||
"compiled"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"father": "^4.1.8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"antd": "^5.4.2",
|
||||
"react": ">=16.9.0",
|
||||
"react-dom": ">=16.9.0"
|
||||
}
|
||||
}
|
||||
4
packages/bank-hooks/src/index.ts
Normal file
4
packages/bank-hooks/src/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import useTask from './use-test'
|
||||
export {
|
||||
useTask
|
||||
}
|
||||
8
packages/bank-hooks/src/use-test.ts
Normal file
8
packages/bank-hooks/src/use-test.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { useEffect } from 'react';
|
||||
|
||||
const useTask = () => {
|
||||
useEffect(() => {
|
||||
console.log('useTask');
|
||||
}, []);
|
||||
};
|
||||
export default useTask;
|
||||
16
packages/bank-hooks/tsconfig.json
Normal file
16
packages/bank-hooks/tsconfig.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"strict": true,
|
||||
"jsx": "preserve",
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"experimentalDecorators": true,
|
||||
"resolveJsonModule": true,
|
||||
"declaration": true
|
||||
},
|
||||
"include": ["src/**/*", "typings/*"]
|
||||
}
|
||||
23
packages/bizComponent/.fatherrc.ts
Normal file
23
packages/bizComponent/.fatherrc.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { defineConfig } from 'father';
|
||||
|
||||
|
||||
|
||||
export default defineConfig({
|
||||
esm: {
|
||||
input: "src",
|
||||
platform: "browser",
|
||||
transformer:"esbuild"
|
||||
|
||||
},
|
||||
|
||||
extraBabelPlugins: [
|
||||
[
|
||||
'babel-plugin-import',
|
||||
{
|
||||
libraryName: 'antd',
|
||||
libraryDirectory: 'es',
|
||||
style: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
});
|
||||
3
packages/bizComponent/.gitignore
vendored
Normal file
3
packages/bizComponent/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/node_modules
|
||||
/dist
|
||||
.DS_Store
|
||||
23
packages/bizComponent/README.md
Normal file
23
packages/bizComponent/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# @alipay/antbank-platform-ui
|
||||
|
||||
[](https://npmjs.org/package/@alipay/antbank-platform-ui)
|
||||
[](https://npmjs.org/package/@alipay/antbank-platform-ui)
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
$ yarn install
|
||||
```
|
||||
|
||||
```bash
|
||||
$ npm run dev
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
TODO
|
||||
|
||||
## LICENSE
|
||||
|
||||
MIT
|
||||
36
packages/bizComponent/package.json
Normal file
36
packages/bizComponent/package.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "@lishican/antbank-platform-ui",
|
||||
"version": "0.0.4",
|
||||
"description": "",
|
||||
"module": "dist/esm/index.js",
|
||||
"types": "dist/esm/index.d.ts",
|
||||
"scripts": {
|
||||
"dev": "father dev",
|
||||
"build": "father build",
|
||||
"build:deps": "father prebundle",
|
||||
"prepublish": "npm run build"
|
||||
},
|
||||
"keywords": [],
|
||||
"authors": [],
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist",
|
||||
"compiled"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"father": "^4.1.8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"antd": "^5.4.2",
|
||||
"react": ">=16.9.0",
|
||||
"react-dom": ">=16.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lishican/antbank-platform-hooks": "^0.0.4",
|
||||
"styled-components": "^5.3.9"
|
||||
}
|
||||
}
|
||||
6
packages/bizComponent/src/index.less
Normal file
6
packages/bizComponent/src/index.less
Normal file
@@ -0,0 +1,6 @@
|
||||
.red {
|
||||
color: red;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
19
packages/bizComponent/src/index.tsx
Normal file
19
packages/bizComponent/src/index.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { useTask } from '@lishican/antbank-platform-hooks';
|
||||
import { Button } from 'antd';
|
||||
import React from 'react';
|
||||
import './index.less';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const HelloWorld: React.FC<any> = () => {
|
||||
useTask();
|
||||
return (
|
||||
<div>
|
||||
<Button type="primary">3332</Button>
|
||||
<h3 className='red'>2131</h3>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export default HelloWorld;
|
||||
16
packages/bizComponent/tsconfig.json
Normal file
16
packages/bizComponent/tsconfig.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"strict": true,
|
||||
"jsx": "preserve",
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"experimentalDecorators": true,
|
||||
"resolveJsonModule": true,
|
||||
"declaration": true
|
||||
},
|
||||
"include": ["src/**/*", "typings/*"]
|
||||
}
|
||||
4
packages/bizComponent/typings/global.d.ts
vendored
Normal file
4
packages/bizComponent/typings/global.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
declare module '*.less' {
|
||||
const styles: { [className: string]: string };
|
||||
export default styles;
|
||||
}
|
||||
Reference in New Issue
Block a user