Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taxi 리디자인 및 웹/앱 코드베이스 단일화 #718

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
"preinstall": "npx only-allow pnpm",
"app": "pnpm --filter @taxi/app",
"web": "pnpm --filter @taxi/web",
"start:app": "pnpm -r --stream start",
"start:app:prod": "NODE_ENV=production pnpm --filter @taxi/app start",
"start:web": "pnpm --filter @taxi/web... start",
"core": "pnpm --filter @taxi/core",
"start:app": "pnpm -r --stream --parallel start",
"start:app:prod": "NODE_ENV=production pnpm --filter @taxi/app... --parallel start",
"start:web": "pnpm --filter @taxi/web... --parallel start",
"build:all": "pnpm -r build",
"build:web": "pnpm --filter @taxi/web... build",
"build:web": "pnpm --filter @taxi/web... --parallel build",
"test": "pnpm -r test",
"typecheck": "pnpm -r typecheck"
},
Expand Down
1 change: 1 addition & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"web": "expo start --web"
},
"dependencies": {
"@taxi/core": "workspace:*",
"@react-navigation/bottom-tabs": "^6.5.11",
"@react-navigation/native": "^6.1.9",
"@react-navigation/stack": "^6.3.20",
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { RootStack } from "@/screens";
import { NavigationContainer } from "@react-navigation/native";
import { hello } from "@taxi/core";
import { StatusBar } from "expo-status-bar";
import { View } from "react-native";

export function App() {
hello(); // test
return (
<View style={{ flex: 1 }}>
<NavigationContainer>
Expand Down
1 change: 1 addition & 0 deletions packages/core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
27 changes: 27 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@taxi/core",
"version": "0.1.0",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"start": "tsup --watch",
"typecheck": "tsc",
"build": "tsup",
"clean": "rm -rf dist"
},
"peerDependencies": {
"react": "*",
"react-native": "*"
},
"peerDependenciesMeta": {
"react-native": {
"optional": true
}
},
"devDependencies": {
"concurrently": "^8.2.2",
"tsc-alias": "^1.8.7",
"tsup": "^8.0.1"
}
}
3 changes: 3 additions & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const hello = () => {
alert("Hello from core");
};
10 changes: 10 additions & 0 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./src",
"paths": {
"@/*": ["./*"]
}
},
"include": ["./src/**/*.ts"]
}
14 changes: 14 additions & 0 deletions packages/core/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["src/index.ts"],
treeshake: true,
sourcemap: "inline",
minify: true,
clean: true,
dts: true,
splitting: false,
format: ["cjs", "esm"],
external: ["react", "react-native"],
injectStyle: false,
});
24 changes: 12 additions & 12 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
"name": "@taxi/web",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "vite",
"build": "tsc && vite build",
"typecheck": "tsc --noEmit",
"preinstall": "npx only-allow pnpm",
"test": "cypress open",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"dependencies": {
"@emotion/css": "^11.10.6",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mui/icons-material": "^5.14.1",
"@mui/material": "^5.4.1",
"@taxi/core": "workspace:*",
"antd": "^5.4.6",
"axios": "^0.21.1",
"browser-image-compression": "^2.0.0",
Expand All @@ -31,15 +41,6 @@
"socket.io-client": "^4.3.2",
"use-state-with-callback": "^3.0.2"
},
"scripts": {
"start": "vite",
"build": "tsc && vite build",
"typecheck": "tsc --noEmit",
"preinstall": "npx only-allow pnpm",
"test": "cypress open",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"browserslist": {
"production": [
">0.2%",
Expand Down Expand Up @@ -84,8 +85,7 @@
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-storybook": "^0.6.15",
"storybook": "^7.5.2",
"typescript": "^5.1.6",
"vite": "^4.5.0",
"vite-plugin-svgr": "^3.2.0"
"vite": "^4.5.1",
"vite-plugin-svgr": "^3.3.0"
}
}
Loading