修复不存在农历的年份, 渲染异常的bug
parent
bc55309c1a
commit
9df56f60c8
|
@ -1,5 +1,7 @@
|
|||
const esbuild = require('esbuild')
|
||||
const { version } = require('./package.json')
|
||||
import esbuild from 'esbuild'
|
||||
import pkg from './package.json' assert { type: 'json' }
|
||||
|
||||
const { version } = pkg
|
||||
|
||||
esbuild.build({
|
||||
entryPoints: ['src/index.js'],
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "bash-calendar",
|
||||
"description": "终端版万年历",
|
||||
"version": "1.2.6",
|
||||
"version": "1.2.7",
|
||||
"author": "yutent <yutent.io@gmail.com>",
|
||||
"bin": {
|
||||
"calendar": "index.js",
|
||||
|
|
|
@ -220,8 +220,11 @@ function drawTbody(year, month) {
|
|||
: tmp.weekend
|
||||
? chalk.redBright(tmp.lunar)
|
||||
: chalk.grey(tmp.lunar)
|
||||
}
|
||||
//
|
||||
tr += ' '.repeat(pad + 2) + tmp.lunar + ' '.repeat(pad + 2) + VLINE
|
||||
} else {
|
||||
tr += ' '.repeat(pad * 2) + VLINE
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@ import chalk from 'chalk'
|
|||
import { CACHE_FILE } from './lunar/config.js'
|
||||
import { getThisYearMonth, drawCalendar } from './calendar.js'
|
||||
|
||||
var version = process.env.APP_VERSION
|
||||
var argvs = process.argv.slice(2)
|
||||
var action = argvs.shift()
|
||||
var [year, month] = getThisYearMonth()
|
||||
const version = process.env.APP_VERSION
|
||||
const argvs = process.argv.slice(2)
|
||||
let action = argvs.shift()
|
||||
let [year, month] = getThisYearMonth()
|
||||
|
||||
function drawOneYear(y) {
|
||||
for (let i = 0; i < 12; i++) {
|
||||
|
|
Loading…
Reference in New Issue