Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
2-one-week authored Apr 9, 2024
0 parents commit b49c838
Show file tree
Hide file tree
Showing 27 changed files with 6,109 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*.{js,ts,tsx}]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true

[*.{json,yml,yaml}]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
65 changes: 65 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/
pnpm-lock.yaml

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

dist

apps/docs/docs

.changeset/*
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@naverpay/eslint-config/front"
}
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @NaverPayDev/frontend
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Related Issue <!-- #뒤에 이슈번호 작성 -->

-

## Describe your changes <!-- PR의 주요 작업 내용 작성 -->

-

## Request <!-- 리뷰어 분들이 집중적으로 보셨으면 하는 내용 (참고할 내용) -->

-
36 changes: 36 additions & 0 deletions .github/workflows/add-assignee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 'add assignee to pull request automatically'
on:
pull_request:
types: [ opened, ready_for_review, synchronize, reopened ]
branches:
- '**'
- '!main'
jobs:
ADD_ASSIGNEE_TO_PULL_REQUEST:
runs-on: ubuntu-latest
steps:
- name: Add Assignee to pr
uses: actions/github-script@v3
with:
script: |
try {
const result = await github.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.number,
})
console.log(result)
if (result.data.assignee === null) {
await github.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
assignees: context.actor,
})
}
} catch (err) {
console.error(`Check Pull Request Error ${err}`)
}
26 changes: 26 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI
on:
pull_request:
branches:
- '**'

jobs:
PrettierAndLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i -g pnpm
- run: node -v && pnpm -v
- run: pnpm install --frozen-lockfile
- run: pnpm run prettier
- run: pnpm run lint
- run: pnpm run markdownlint

Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i -g pnpm
- run: node -v && pnpm -v
- run: pnpm install --frozen-lockfile
- run: pnpm run test
38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: release packages

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Install pnpm
run: npm i -g pnpm

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
title: '🚀 version changed packages'
commit: '📦 bump changed packages version'
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/size-limit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'size-limit'
on:
pull_request:
branches: main

jobs:
size:
runs-on: ubuntu-latest
steps:
- run: npm i -g pnpm
- run: node -v && pnpm -v
- uses: actions/checkout@v4
- uses: andresz1/size-limit-action@v1
with:
build_script: 'build'
clean_script: 'clean'
github_token: ${{ secrets.GITHUB_TOKEN }}
83 changes: 83 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# etc
.idea
.vscode

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

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
/coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Dependency directories
node_modules/
jspm_packages/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.local

# production
build

# misc
.DS_Store
*.pem

# vercel
.vercel

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

# next.js build output
.next/
dist/
out/

# turbo
.turbo

# telemetry disable 설정 릴리즈시점에 커밋에 섞여들어옴. 이를 방지하기 위함
apps/web/cache/
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
3 changes: 3 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@naverpay/markdown-lint"
}
3 changes: 3 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.changeset
**/CHANGELOG.md
apps/docs/**/*.md
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.github
.changeset
.husky
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# changeset 제외
.changeset

# markdown 포맷팅은 markdown-lint에게 맡깁니다.
**/*.md

# pnpm lock yaml 제외
pnpm-lock.yaml
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@naverpay/prettier-config"
18 changes: 18 additions & 0 deletions .size-limit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const path = require('path')
const glob = require('glob')
const fs = require('fs')

const packageJsonList = glob
.globSync('**/package.json', {
cwd: path.join(process.cwd(), 'packages'),
})
.map((filePath) => {
const {name, main} = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'packages', filePath), 'utf8'))
const packageName = name.split('/')[1]
return {
name: packageName,
path: `packages/${packageName}${main.slice(1)}`,
}
})

module.exports = packageJsonList
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 NaverPayDev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## ts-monorepo-template
Loading

0 comments on commit b49c838

Please sign in to comment.