Skip to content

Commit

Permalink
feat: migrate pnpm monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed May 8, 2022
1 parent b3b5e6a commit 3b0b56f
Show file tree
Hide file tree
Showing 11 changed files with 334 additions and 310 deletions.
18 changes: 2 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,10 @@
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"@unocss/preset-wind": "^0.29.5",
"@unocss/reset": "^0.29.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-markdown": "^8.0.1",
"unocss": "^0.29.5"
"play": "pnpm run --filter ./playground dev"
},
"devDependencies": {
"@types/node": "^17.0.22",
"@types/react": "^17.0.33",
"@types/react-dom": "^17.0.10",
"@vitejs/plugin-react": "^1.0.7",
"typescript": "^4.5.4",
"vite": "^2.9.0"
"typescript": "^4.5.4"
}
}
File renamed without changes.
24 changes: 24 additions & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "playground",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"@unocss/preset-wind": "^0.29.5",
"@unocss/reset": "^0.29.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-markdown": "^8.0.1",
"unocss": "^0.29.5"
},
"devDependencies": {
"@types/react": "^17.0.33",
"@types/react-dom": "^17.0.10",
"@vitejs/plugin-react": "^1.0.7",
"vite": "^2.9.0"
}
}
3 changes: 2 additions & 1 deletion src/Resume.tsx → playground/src/Resume.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import '@unocss/reset/tailwind.css'

function Resume() {
const [markdown] = useState<string>(() => {
const globResult = import.meta.globEager("../README.md", {
const globResult = import.meta.globEager("../../README.md", {
as: "raw",
})
console.log("🚀 ~ file: Resume.tsx ~ line 13 ~ Resume ~ globResult", globResult)

return (Object.values(globResult)[0]) as unknown as string
})
Expand Down
File renamed without changes.
File renamed without changes.
18 changes: 14 additions & 4 deletions tsconfig.json → playground/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"lib": [
"DOM",
"DOM.Iterable",
"ESNext"
],
"allowJs": false,
"skipLibCheck": false,
"esModuleInterop": false,
Expand All @@ -16,6 +20,12 @@
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}
"include": [
"playground/src"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}
File renamed without changes.
1 change: 0 additions & 1 deletion vite.config.ts → playground/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { readFileSync} from 'fs'
import unocss from 'unocss/vite'
import { presetWind } from 'unocss'

Expand Down
Loading

0 comments on commit 3b0b56f

Please sign in to comment.