master
宇天 2021-11-26 17:24:37 +08:00
commit 57d199b7c0
5 changed files with 88 additions and 0 deletions

17
.gitignore vendored Normal file
View File

@ -0,0 +1,17 @@
.DS_Store
.AppleDouble
.LSOverride
.vscode
.idea
node_modules/
package-lock.json
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes

9
.prettierrc.yaml Normal file
View File

@ -0,0 +1,9 @@
jsxBracketSameLine: true
jsxSingleQuote: true
semi: false
singleQuote: true
printWidth: 100
useTabs: false
tabWidth: 2
trailingComma: none
bracketSpacing: true

27
Readme.md Normal file
View File

@ -0,0 +1,27 @@
```
____ _ _
/ ___|__ _| | ___ _ __ __| | __ _ _ __
| | / _` | |/ _ \ '_ \ / _` |/ _` | '__|
| |__| (_| | | __/ | | | (_| | (_| | |
\____\__,_|_|\___|_| |_|\__,_|\__,_|_| 终端版万年历
```
## 安装
```bash
npm i -g bash-calendar
```
## 用法
> 用法: `cal [command] args...`
+ Commands:
* -h - 查看帮助文档
* -v - 查看工具的版本
## 更新日志
### v0.0.1
* 初始化项目

17
index.js Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env node
/**
* {终端版万年历}
* @author yutent<yutent.io@gmail.com>
* @date 2021/11/26 17:20:02
*/
function print(...args) {
args[0] = args[0].padEnd(20, ' ')
if (args.length > 1) {
args.splice(1, 0, ' - ')
}
console.log.apply(null, args)
}
print('Hello calendar!')

18
package.json Normal file
View File

@ -0,0 +1,18 @@
{
"name": "bash-calendar",
"description": "终端版万年历",
"version": "0.0.1",
"author": "yutent <yutent.io@gmail.com>",
"bin": {
"calendar": "index.js",
"cal": "index.js"
},
"dependencies": {
"chalk": "^4.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/yutent/bash-calendar.git"
},
"license": "MIT"
}