Skip to content

@yamanoku yamanoku released this May 26, 2019 · 84 commits to master since this release

Updates

Add Prettier

add prettier & eslint package

  • prettier
  • eslint-config-prettier
  • eslint-plugin-prettier

Add typescript compiler in watch mode

npm scripts add yarn watch (tsc -w) command.

Assets 2

@yamanoku yamanoku released this May 25, 2019 · 87 commits to master since this release

Updates

Base Source TypeScript

Changed base source from JavaScript to TypeScript.

5198a1e

source

src/countdown.js => src/countdown.ts

tslint.json => @typescript-eslint

typescript linter changed from tslint.json to @typescript-eslint

conpile target es5 => es6

https://github.com/yamanoku/birthday-countdown-js/blob/3c109172b8f171b7ba6e9824431b072d549fa91d/tsconfig.json#L4

Assets 2

@yamanoku yamanoku released this Feb 6, 2018 · 171 commits to master since this release

Updates

TypeScript Support 🎉

Wow 😲 !! birthday-countdown.js have come to support TypeScript, i.e. Type Definition !
Build File generate command is yarn tsc (npm run tsc).

source

src/ts/countdown.ts

config

tsconfig.json

Added tslint 🔧

In addition to this, TypeScript Linter Added.
yarn lint command to see that the Linter is running.

config

tslint.json

Added renovate

In addition to this, Automated Dependency Management "Renovate".

Next Project

  • Support React Modlue
  • Support Vue.js Module
Assets 2

@yamanoku yamanoku released this Feb 6, 2018 · 176 commits to master since this release

Updates

Refactoring countdown.js

Update package.json

  • browser-sync@2.23.6
  • eslint@4.17.0
Assets 2

@yamanoku yamanoku released this Nov 8, 2017 · 177 commits to master since this release

Fix npm scripts

test => lint

before

yarn test(npm run test)

after

yarn lint(npm run lint)

Assets 2

@yamanoku yamanoku released this Nov 7, 2017 · 178 commits to master since this release

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"]
  },
Assets 2

@yamanoku yamanoku released this Nov 7, 2017 · 183 commits to master since this release

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

Assets 2
You can’t perform that action at this time.