Skip to content

Commit

Permalink
refactor: 元旦 tips
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Dec 25, 2018
1 parent 495f6c0 commit 65b5414
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/taro-cli/bin/taro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ const { getPkgVersion, printPkgVersion } = require('../src/util')

printPkgVersion()

const startTime = new Date('2019-1-1 00:00').getTime()
const endTime = new Date('2019-1-2 00:00').getTime()
const nowTime = Date.now()
if (nowTime >= startTime && nowTime <= endTime) {
const yearTxt = String(require('fs-extra').readFileSync(require('path').resolve(__dirname, 'year.txt')))
console.log(require('chalk').rgb(255, 87, 34)(yearTxt))
}

program
.version(getPkgVersion())
.usage('<command> [options]')
Expand Down
9 changes: 9 additions & 0 deletions packages/taro-cli/bin/year.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮
🎉 _ _ _ _ _____ _____ __ _____ _ 🎉
🏮 | | | | | | | / __ | _ / || _ | | | 🏮
🎉 | |_| | ___| | | ___ `' / /| |/' `| || |_| | | | 🎉
🏮 | _ |/ _ | | |/ _ \ / / | /| || |\____ | | | 🏮
🎉 | | | | __| | | (_) | ./ /__\ |_/ _| |.___/ / |_| 🎉
🏮 \_| |_/\___|_|_|\___/ \_____/\___/\___\____/ (_) 🏮
🎉 🎉
🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮 🎉 🏮

1 comment on commit 65b5414

@schinvendy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哈哈哈,你们也打算弄彩蛋了

Please sign in to comment.