Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Commit 05903a4

Browse files
authored
Merge pull request #11 from fastjs-team/dev
Version 2.4.6
2 parents 577578b + 9371238 commit 05903a4

File tree

5 files changed

+417
-338
lines changed

5 files changed

+417
-338
lines changed

bin/cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ output("")
1919
program
2020
.name('fastjs')
2121
.description('Fastjs cli can help you build a npm project easily.')
22-
.version(`fastjs ${require('../package.json').version}`)
22+
.version(`fastjs-cli ${require('../package.json').version}`)
2323
.usage('<command> [options]');
2424

2525
program

lib/console/clean.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// import readline from 'node:readline'
2+
const readline = require('readline')
3+
4+
module.exports = function clear() {
5+
try {
6+
const repeatCount = process.stdout.rows - 2
7+
const blank = repeatCount > 0 ? '\n'.repeat(repeatCount) : ''
8+
console.log(blank)
9+
readline.cursorTo(process.stdout, 0, 0)
10+
readline.clearScreenDown(process.stdout)
11+
console.log("")
12+
} catch (e) {
13+
console.log(e)
14+
}
15+
}

0 commit comments

Comments
 (0)