Compare commits

...

2 Commits

4 changed files with 19 additions and 7 deletions

View File

@ -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'],

7
index.js Executable file

File diff suppressed because one or more lines are too long

View File

@ -221,8 +221,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
}

View File

@ -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++) {