Releases: yamanoku/birthday-countdown
Releases · yamanoku/birthday-countdown
Ver2.1.1
Ver2.1.0
Ver2.0.0 Updates
Updates
ES2015 Migration 🎉
countdown.js
Updates. Although it was described by ES5 until now, this version migrate to ES2015.
Add Babel 🔧
If use it with browser not support ES2015, compile with Babel. Added yarn build
command, Please use it as necessary 😄
"scripts": {
"build": "babel src -d build",
},
"babel": {
"presets": ["es2015"]
},
Add husky 🐶 Tool
Added precommit
& postmerge
command. https://github.com/typicode/husky
precommit
isyarn test
works when committing. When bugs are found with eslint, Can't commit . No lint, No bug.postmerge
automatically installyarn install
whenpackage.json
is updated, when dependency packages added.
"scripts": {
"precommit": "lint-staged",
"postmerge": "(git diff 'HEAD@{1}' --name-only | grep package.json > /dev/null) && yarn || :"
},
"lint-staged": {
"src/*.js": ["test"]
},
Ver1.0.0 Publish
Overview
- birthday-countdown Pure JavaScript.
- Written ES5, use it without problems with each browser.
- Once the date and time is set, don't have to take it again after have a birthday.
Use
Setting
<div id="CDT"></div>
<script src="src/countdown.js"></script>
Edit data
Name
Line: 19
timer += '<p>やまのくの誕生日まで</p>';
Birthday Contents
Line: 50 & 51
mes += '<a class="birth_btn" href="http://amzn.asia/cti4d0v" target="_blank">欲しいものを送ってやる</a>';
mes += '<a class="birth_btn" href="http://amzn.asia/8Kh4dGA" target="_blank">酒を送ってやる</a>';