Skip to content

Commit

Permalink
부산대 FE 김도균 Week6 step 3 (#64)
Browse files Browse the repository at this point in the history
* chore : week5 가져오기

* feat : url selector

* feat : api session storage

* feat : session storage axios instance

* feat : use sessionStorageApi

* feat : header selector can change api

* chore : deploy workflow

* chore : rename action

* fix : github_token

* chore : cache node modules

* fix : GH_TOKEN

* fix : add permission

* chore : homepage 설정

* chore : homepage 설정

* fix : add browserrouter basename

* fix : (blocked:mixed-content) 해결

* fix : use http

* fix : homepage

* fix : homepage

* fix : default url

* chore : cname

* fix : cname 오타

* chore : use npm i

* Revert "fix : default url"

This reverts commit 806d0e0.

* chore : remove cname

* chore : use proxyserver

* chore : npm run start is https

* fix : api default url

* fix : change homepage

* fix : redirect after login

* fix : 404 on routed page

* feat : add api

* refactor : mock api return token

* refactor : session has user email

* feat : Tab으로 분리

* design : Order Page use Point

* design : MyAccount design
  • Loading branch information
jasper200207 authored Aug 4, 2024
1 parent f608935 commit 656c314
Show file tree
Hide file tree
Showing 86 changed files with 37,252 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'plugin:@typescript-eslint/recommended',
'airbnb/hooks',
'airbnb-typescript',
'prettier',
'plugin:storybook/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'react',
'@typescript-eslint',
'react-hooks',
'json-format',
'simple-import-sort',
'@emotion',
'prettier',
],
rules: {
'react/react-in-jsx-scope': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'@typescript-eslint/consistent-type-imports': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
},
],
'import/extensions': ['off'],
'import/no-extraneous-dependencies': ['off'],
'react/jsx-filename-extension': [
'warn',
{
extensions: ['.tsx', '.js', '.jsx'],
},
],
'@typescript-eslint/no-use-before-define': ['off'],
},
ignorePatterns: ['**/build/**/*', '.eslintrc.js', 'craco.config.js'],
settings: {
'import/resolver': {
typescript: {},
},
},
};
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: deploy

on:
push:
branches:
- jasper200207
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 10

permissions:
id-token: write
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache node modules
uses: actions/cache@v3
id: cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm i

- name: Build
run: |
npm run build
cp ./build/index.html ./build/404.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./build
publish_branch: gh-pages
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

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

.yaml
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.vscode
/node_modules

8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 100,
"arrowParens": "always"
}
23 changes: 23 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const path = require('path');

module.exports = {
webpack: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
jest: {
configure: {
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
},
},
devServer: {
headers: {
'Access-Control-Allow-Origin': 'http://localhost:3000',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
'Access-Control-Allow-Credentials': 'true',
},
},
};
Loading

0 comments on commit 656c314

Please sign in to comment.