diff --git a/.gitignore b/.gitignore index c06f4f5c..b861eae8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ packages/*/lib packages/*/types plugins/*/lib plugins/*/types +examples/*/lib +examples/*/types .next .env .env.local diff --git a/examples/next-starter/plugins/custom-antd/CHANGELOG.md b/examples/next-starter/plugins/custom-antd/CHANGELOG.md new file mode 100644 index 00000000..420e6f23 --- /dev/null +++ b/examples/next-starter/plugins/custom-antd/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log diff --git a/examples/next-starter/plugins/custom-antd/package.json b/examples/next-starter/plugins/custom-antd/package.json new file mode 100644 index 00000000..ecfc4288 --- /dev/null +++ b/examples/next-starter/plugins/custom-antd/package.json @@ -0,0 +1,55 @@ +{ + "name": "@onr/plugin-custom-antd", + "private": true, + "version": "0.10.9", + "description": "add global config to antd plugin", + "license": "ISC", + "main": "lib/index.js", + "source": "src/index.ts", + "types": "types/index.d.ts", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib", + "types", + "src" + ], + "scripts": { + "dev": "tsc --watch --preserveWatchOutput", + "lint": "prettier -c 'src/**/*'; eslint src --ext .ts,.tsx", + "format": "prettier --write 'src/**/*'; eslint src --fix --ext .ts,.tsx", + "build": "tsc --build tsconfig.json", + "test": "jest --coverage --passWithNoTests", + "test:watch": "yarn test --watch", + "prepublishOnly": "yarn build" + }, + "bugs": { + "url": "https://github.com/OnrampLab/onr-react-ui/issues" + }, + "dependencies": { + "antd": "^5.10.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "peerDependencies": { + "next": "^13.4.2", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@babel/preset-typescript": "^7.22.5", + "@onr/eslint-config": "^0.6.2", + "@onr/prettier-config": "^1.4.2", + "@types/node": "^14.14.21", + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", + "eslint": "^8.40.0", + "typescript": "^5.1.3" + }, + "prettier": "@onr/prettier-config", + "publishConfig": { + "access": "public" + } +} diff --git a/examples/next-starter/plugins/custom-antd/src/components/Input.tsx b/examples/next-starter/plugins/custom-antd/src/components/Input.tsx new file mode 100644 index 00000000..560687f0 --- /dev/null +++ b/examples/next-starter/plugins/custom-antd/src/components/Input.tsx @@ -0,0 +1,8 @@ +import { Input as AntdInput, InputProps } from 'antd'; +import React from 'react'; + +interface Props extends InputProps {} + +export const Input: React.FC = props => { + return {props.children}; +}; diff --git a/examples/next-starter/plugins/custom-antd/src/components/index.ts b/examples/next-starter/plugins/custom-antd/src/components/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/examples/next-starter/plugins/custom-antd/src/index.ts b/examples/next-starter/plugins/custom-antd/src/index.ts new file mode 100644 index 00000000..07635cbb --- /dev/null +++ b/examples/next-starter/plugins/custom-antd/src/index.ts @@ -0,0 +1 @@ +export * from './components'; diff --git a/examples/next-starter/plugins/custom-antd/tsconfig.json b/examples/next-starter/plugins/custom-antd/tsconfig.json new file mode 100644 index 00000000..aadb2fd2 --- /dev/null +++ b/examples/next-starter/plugins/custom-antd/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.components.json", + "compilerOptions": { + "outDir": "lib", + "declarationDir": "./types", + "sourceMap": true + }, + "include": ["src/**/*"], + "exclude": ["**/*.spec.tsx?"] +}