-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ui-patterns): split package into lib and playground (#1116)
- Loading branch information
1 parent
3ba61af
commit f4cadea
Showing
22 changed files
with
689 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true }, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react-hooks/recommended', | ||
], | ||
ignorePatterns: ['dist', '.eslintrc.cjs'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['react-refresh'], | ||
rules: { | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @inovex.de/ui-patterns-playground | ||
|
||
This package serves as a testing and demonstration environment for the UI patterns using the inovex Elements web components styled with Tailwind CSS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "ui-patterns-playground", | ||
"private": true, | ||
"version": "8.1.3", | ||
"type": "module", | ||
"dependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"@inovex.de/ui-patterns": "8.1.3" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.2.37", | ||
"@types/react-dom": "^18.2.15", | ||
"@typescript-eslint/eslint-plugin": "^6.10.0", | ||
"@typescript-eslint/parser": "^6.10.0", | ||
"@vitejs/plugin-react": "^4.2.0", | ||
"eslint": "^8.53.0", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-react-refresh": "^0.4.4", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"name": "ui-patterns-playground", | ||
"projectType": "application", | ||
"sourceRoot": "packages/ui-patterns-playground/src", | ||
"tags": [], | ||
"targets": { | ||
"build": { | ||
"executor": "nx:run-commands", | ||
"outputs": ["{projectRoot}/dist"], | ||
"options": { | ||
"cwd": "packages/ui-patterns-playground", | ||
"commands": ["vite build"] | ||
} | ||
}, | ||
"start": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"cwd": "packages/ui-patterns-playground" | ||
}, | ||
"defaultConfiguration": "dev", | ||
"configurations": { | ||
"dev": { | ||
"command": "vite --port 4500" | ||
}, | ||
"prod": { | ||
"command": "vite preview --port 4500" | ||
} | ||
} | ||
}, | ||
"lint": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"cwd": "packages/ui-patterns-playground", | ||
"command": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0" | ||
}, | ||
"configurations": { | ||
"fix": { | ||
"command": "eslint . --ext ts,tsx --fix --report-unused-disable-directives --max-warnings 0" | ||
} | ||
} | ||
}, | ||
"clean": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"cwd": "packages/ui-patterns-playground", | ||
"command": "shx rm -rf dist" | ||
}, | ||
"configurations": { | ||
"nodejs": { | ||
"command": "shx rm -rf node_modules" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import './App.css'; | ||
import { MyPatternA } from '@inovex.de/ui-patterns'; | ||
import '@inovex.de/elements-react'; | ||
|
||
function App() { | ||
return ( | ||
<> | ||
<MyPatternA /> | ||
</> | ||
); | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import '@inovex.de/ui-patterns/dist/style.css'; |
4 changes: 2 additions & 2 deletions
4
packages/ui-patterns/src/main.tsx → packages/ui-patterns-playground/src/main.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="vite/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"useDefineForClassFields": true, | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
"module": "ESNext", | ||
"skipLibCheck": true, | ||
|
||
/* Bundler mode */ | ||
"moduleResolution": "node", | ||
"allowImportingTsExtensions": true, | ||
"allowSyntheticDefaultImports": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "react-jsx", | ||
|
||
/* Linting */ | ||
"strict": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noFallthroughCasesInSwitch": true | ||
}, | ||
"include": ["src"], | ||
"references": [{ "path": "./tsconfig.node.json" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": true, | ||
"skipLibCheck": true, | ||
"module": "ESNext", | ||
"moduleResolution": "bundler", | ||
"allowSyntheticDefaultImports": true | ||
}, | ||
"include": ["vite.config.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,40 @@ | ||
{ | ||
"name": "ui-patterns", | ||
"projectType": "application", | ||
"sourceRoot": "packages/ui-patterns/src", | ||
"tags": [], | ||
"targets": { | ||
"build": { | ||
"executor": "nx:run-commands", | ||
"outputs": ["{projectRoot}/dist"], | ||
"options": { | ||
"cwd": "packages/ui-patterns", | ||
"commands": [ | ||
"tsc", | ||
"vite build" | ||
] | ||
} | ||
}, | ||
"dev": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"cwd": "packages/ui-patterns" | ||
}, | ||
"defaultConfiguration": "dev", | ||
"configurations": { | ||
"dev": { | ||
"command": "vite --port 4400" | ||
}, | ||
"prod": { | ||
"command": "vite preview --port 4400" | ||
} | ||
} | ||
"name": "ui-patterns", | ||
"projectType": "library", | ||
"sourceRoot": "packages/ui-patterns/src", | ||
"tags": [], | ||
"targets": { | ||
"build": { | ||
"executor": "nx:run-commands", | ||
"outputs": ["{projectRoot}/dist"], | ||
"options": { | ||
"cwd": "packages/ui-patterns", | ||
"commands": ["tsc", "vite build"] | ||
} | ||
}, | ||
"lint": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"cwd": "packages/ui-patterns", | ||
"command": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0" | ||
}, | ||
"lint": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"cwd": "packages/ui-patterns", | ||
"command": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0" | ||
}, | ||
"configurations": { | ||
"fix": { | ||
"command": "eslint . --ext ts,tsx --fix --report-unused-disable-directives --max-warnings 0" | ||
} | ||
"configurations": { | ||
"fix": { | ||
"command": "eslint . --ext ts,tsx --fix --report-unused-disable-directives --max-warnings 0" | ||
} | ||
} | ||
}, | ||
"clean": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"cwd": "packages/ui-patterns", | ||
"command": "shx rm -rf dist" | ||
}, | ||
"clean": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"cwd": "packages/ui-patterns", | ||
"command": "shx rm -rf dist" | ||
}, | ||
"configurations": { | ||
"nodejs": { | ||
"command": "shx rm -rf node_modules" | ||
} | ||
"configurations": { | ||
"nodejs": { | ||
"command": "shx rm -rf node_modules" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.