Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
504e883
docs: 기능명세 작성
yunjin-kim Feb 22, 2022
01c5285
chore: eslint, prettier 설정
yunjin-kim Feb 22, 2022
f39d23c
test: 금액 유효성검사
yunjin-kim Feb 22, 2022
6d0ae4e
chore: eslint 설정변경
yunjin-kim Feb 22, 2022
228a754
design: 기본UI 작성
yunjin-kim Feb 22, 2022
c606d30
feat: 로또 구입 금액 입력 기능 추가
yunjin-kim Feb 22, 2022
86eaa23
test: 구입한 로또 금액만큼 로또 개수 확인
yunjin-kim Feb 22, 2022
fbae184
feat: 로또 발급 기능 추가
yunjin-kim Feb 22, 2022
61d3de9
feat: 번호 보기 토글버튼 기능 추가
yunjin-kim Feb 23, 2022
cda0d60
test: 구입한 로또 금액만큼 개수 확인 테스트 수정
yunjin-kim Feb 23, 2022
46640fc
design: 로또 style 수정
yunjin-kim Feb 23, 2022
b9dace2
refactor: 상수화
yunjin-kim Feb 23, 2022
6e7bc05
chore: eslint 수정 및 eslint에 맞게 코드 수정
yunjin-kim Feb 24, 2022
cac4318
chore: 웹팩 배포 설정 변경
yunjin-kim Feb 24, 2022
a2b397b
refactor: html에서 불러오는 js,css 삭제
yunjin-kim Feb 24, 2022
5305fa0
refactor: model private 필드 선언 변경
yunjin-kim Feb 24, 2022
737d3a5
chore: github-page 배포 설정
yunjin-kim Feb 24, 2022
9a03f6e
fix: 코드 규격에 맞게 수정
yunjin-kim Feb 24, 2022
fd27369
feat: 로또 구매 잘못된 값 입력시 input값 제거
yunjin-kim Feb 24, 2022
8abac22
docs: README 수정
yunjin-kim Feb 24, 2022
22b929e
feat: 로또 최대 구매가능 개수 기능 추가
yunjin-kim Feb 24, 2022
d8646bf
feat: 로또 재구매시 전에 샀던 기록 초기화 기능 추가
yunjin-kim Feb 24, 2022
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
19 changes: 19 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": ["airbnb-base", "plugin:prettier/recommended"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": "latest"
},
"rules": {
"prettier/prettier": ["error"],
"max-depth": ["error", 1],
"no-new": "off",
"import/extensions": "off",
"max-lines-per-function": ["error", 15],
"printWidth": 100
}
}
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
13 changes: 13 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## 기능 명세

- [x] 구입할 금액을 입력할 수 있어야 한다
- [x] 금액은 천 단위로 입력해야 한다
- [x] 금액은 빈값으로 입력할 수 없다
- [x] 금액은 음수를 입력할 수 없다
- [x] 구입한 로또 금액만큼 로또를 발급할 수 있어야 한다
- [x] 발급 후 로또의 번호를 볼 수 없다
- [x] 로또 한장의 가격은 1000원이다
- [x] 로또의 번호는 자동으로 정해진다
- [x] 로또의 번호는 중복없이 1이상 45이하이다
- [x] 구입한 로또 금액만큼 로또 개수를 확인할 수 있어야 한다
- [x] 번호 보기 토글 버튼을 클릭해 로또 번호를 볼 수 있어야 한다.
21 changes: 20 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,27 @@
<body>
<div id="app">
<h1>🎱 행운의 로또</h1>
<section id="lotto-purchase">
<form id="lotto-purchase-form">
<label for="purchase-money">구입할 금액을 입력해주세요.</label>
<input id="lotto-purchase-input" name="purchase-money" type="number" placeholder="5개까지 구매할 수 있습니다 (1개: 1000원)" />
<button type="submit">구입</button>
</form>
</section>
<section id="lotto-purchase-result">
<div>
<p id="lotto-purchase-count">아직 구매하신 로또가 없습니다.</p>
<div id="lotto-list"></div>
</div>
<div id="lotto-toggle-wrap">
<p>번호보기</p>
<label class="switch" for="show-lotto-toggle">
<input id="show-lotto-toggle" name="show-lotto-toggle" type="checkbox" />
<span class="slider round"></span>
</label>
</div>
</section>
</div>
<script type="module" src="./src/js/index.js"></script>
</body>

</html>
Loading