Skip to content

Commit

Permalink
Merge pull request #35 from Eagle2gle/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
m4nd4r1n authored Feb 11, 2023
2 parents 5cf301a + 27da5f8 commit c0fe99e
Show file tree
Hide file tree
Showing 85 changed files with 13,377 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.js
node_modules
70 changes: 70 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"env": {
"node": true,
"es2021": true
},
"extends": [
"next",
"next/core-web-vitals",
"plugin:import/errors",
"plugin:import/warnings",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:react/jsx-runtime",
"prettier"
],
"overrides": [],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"next": {
"rootDir": "src/*/"
},
"react": {
"version": "detect"
}
},
"plugins": ["import", "react", "react-refresh"],
"rules": {
"eol-last": [1, "always"],
"react-refresh/only-export-components": "warn",
"import/no-unresolved": "off",
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "sibling", "parent", "index", "type", "unknown"],
"pathGroups": [
{
"pattern": "{react*,react*/**}",
"group": "external",
"position": "before"
},
{
"pattern": "{shared*,shared*/**}",
"group": "external",
"position": "after"
},
{
"pattern": "{@*,@*/**}",
"group": "internal",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react", "unknown"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
}
}
9 changes: 5 additions & 4 deletions .github/ISSUE_TEMPLATE/이슈-템플릿.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
---
name: 이슈 템플릿
about: Issue Template
title: "[작업유형] 작업내용 "
title: "[작업유형] 작업내용"
labels: ''
assignees: ''

---

🤷‍♂️ Description
## 🤷‍♂️ Description
(내용 요약)

- [ ] 체크리스트
- [ ] 체크리스트
- [ ] 체크리스트

🏆 Test Code
## 🏆 Test Code

(미리 테스트 코드 작성할 사람만)

📒 Remarks
## 📒 Remarks

(특이사항)
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@

## 📒 Remarks

> 팀원이 코드 리뷰 시 주의할 점 또는 말하고 싶은 점, 특이사항
> 팀원이 코드리뷰 시 주의할 점 또는 말하고 싶은 점 특이사항
26 changes: 26 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CD

on:
pull_request:
types: [closed]
branches: [main]

jobs:
cd:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: SSH Remote Commands
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
timeout: 30s
script: |
cd wealth-marble-frontend
git pull
npm i -f
npm run build
pm2 delete wealth-marble
pm2 start npm --name "wealth-marble" -- start
35 changes: 35 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: [dev]
pull_request:
branches: [dev]

jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: ${{ secrets.NODE_VERSION }}
- name: Cache node modules
uses: actions/[email protected]
id: node-modules-cache
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Install Dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm i -f
- name: Create .sentryclirc
shell: bash
run: |
echo "${{ secrets.SENTRY_TOKEN }}" > .sentryclirc
- name: Build Test
run: npm run build
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

.env
# Sentry
.sentryclirc
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.md
23 changes: 23 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"bracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 100,
"quoteProps": "as-needed",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"jsxBracketSameLine": false,
"overrides": [
{
"files": "*.json",
"options": {
"printWidth": 200
}
}
]
}
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
# wealth-marble-frontend
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
48 changes: 48 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// This file sets a custom webpack configuration to use your Next.js app
// with Sentry.
// https://nextjs.org/docs/api-reference/next.config.js/introduction
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

const { withSentryConfig } = require('@sentry/nextjs');
/** @type {import('next').NextConfig} */
const moduleExports = {
// Your existing module.exports
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'wealth-marble-image.s3.ap-northeast-2.amazonaws.com',
},
],
},

async rewrites() {
return [{ source: '/api/:path*', destination: `http://13.125.187.195:8080/api/:path*` }];
},
sentry: {
// Use `hidden-source-map` rather than `source-map` as the Webpack `devtool`
// for client-side builds. (This will be the default starting in
// `@sentry/nextjs` version 8.0.0.) See
// https://webpack.js.org/configuration/devtool/ and
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map
// for more information.
hideSourceMaps: true,
},
};

const sentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, org, project, authToken, configFile, stripPrefix,
// urlPrefix, include, ignore

silent: true, // Suppresses all logs
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
};

// Make sure adding Sentry options is the last code to run before exporting, to
// ensure that your source maps include changes from all other Webpack plugins
module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions);
Loading

0 comments on commit c0fe99e

Please sign in to comment.