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

npm 배포 설정 #9

Merged
merged 5 commits into from
Jan 31, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

# review when someone opens a pull request.

- @Hanna922 @JjungminLee
* @Hanna922 @JjungminLee
26 changes: 26 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.yarn
package.tgz
36 changes: 27 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
{
"name": "yls-web",
"name": "@yourssu/logging-system-react",
"private": "false",
"version": "1.0.0",
"description": "",
"main": "index.js",
"description": "Yourssu Logging System for React",
"keywords": [
"yourssu",
"loggin system",
"react"
],
"repository": {
"type": "git",
"url": "git+https://github.com/yourssu/YLS-Web.git"
},
"author": "",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

큰건 아니구! 이거 없어도 되나용? ㅋㅎㅋㅎ

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앜ㅋㅋㅋㅋㅋㅋ 없어도 괜찮아요!! 저희는 author가 좀 유동적이라 생각해서 작성하지 않았슴다 ㅎ

"license": "MIT",
"type": "module",
"types": "./dist/index.d.ts",
"main": "./dist/index.cjs.js",
"module": "./dist/index.es.js",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.es.js",
"require": "./dist/index.cjs.js"
}
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"keywords": [],
"author": "",
"license": "MIT",
"peerDependencies": {
"axios": "^1.6.4",
"react": "^18.2.0",
Expand All @@ -39,7 +57,7 @@
"react-dom": "^18.2.0",
"react-router-dom": "^6.21.3",
"typescript": "^5.2.2",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ts 관련한 의존성은 devDependencies로 빼는거 어떨까요? 어차피 soomsilV2에 있고, 개발과정에서만 필요한것 같아서용!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

엇 이미 devDependencies에 있는데 혹쉬 다르게 보이시나요.....????

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

헉 죄송해요 그 펼치는거 안해서! 잘못봤네영! 머지하셔도 될것 같아용! 수고하셨습니당!!

"vite": "^5.0.8"
},
"dependencies": {}
"vite": "^5.0.8",
"vite-plugin-dts": "^3.7.2"
}
}
29 changes: 28 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
import path from 'path';

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [
react(),
dts({
insertTypesEntry: true,
}),
],
build: {
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
name: '@yourssu/logging-system-react',
formats: ['es', 'cjs'],
fileName: (format) => `index.${format}.js`,
},
rollupOptions: {
external: ['react', 'react-dom'],
output: {
globals: {
react: 'React',
'react-dom': 'ReactDOM',
},
banner: '"use client";',
interop: 'compat',
},
},
},
});
Loading