Skip to content

Releases: yamanoku/birthday-countdown

Ver2.1.1

06 Feb 07:54

Choose a tag to compare

Updates

Refactoring countdown.js

Update package.json

  • browser-sync@2.23.6
  • eslint@4.17.0

Ver2.1.0

08 Nov 08:46

Choose a tag to compare

Fix npm scripts

test => lint

before

yarn test(npm run test)

after

yarn lint(npm run lint)

Ver2.0.0 Updates

07 Nov 13:53

Choose a tag to compare

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 is yarn test works when committing. When bugs are found with eslint, Can't commit . No lint, No bug.
  • postmerge automatically install yarn install when package.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

07 Nov 14:22

Choose a tag to compare

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>';

Thanks