mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-05-17 22:14:17 +02:00
make fancy logger dumb in ci
This commit is contained in:
parent
40a72eba44
commit
1bb6f09db1
2
package-lock.json
generated
2
package-lock.json
generated
@ -35,6 +35,7 @@
|
||||
"mdast-util-to-hast": "^13.2.0",
|
||||
"mdast-util-to-string": "^4.0.0",
|
||||
"micromorph": "^0.4.5",
|
||||
"minimatch": "^10.0.1",
|
||||
"pixi.js": "^8.8.1",
|
||||
"preact": "^10.26.4",
|
||||
"preact-render-to-string": "^6.5.13",
|
||||
@ -5254,6 +5255,7 @@
|
||||
"version": "10.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz",
|
||||
"integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
|
@ -61,6 +61,7 @@
|
||||
"mdast-util-to-hast": "^13.2.0",
|
||||
"mdast-util-to-string": "^4.0.0",
|
||||
"micromorph": "^0.4.5",
|
||||
"minimatch": "^10.0.1",
|
||||
"pixi.js": "^8.8.1",
|
||||
"preact": "^10.26.4",
|
||||
"preact-render-to-string": "^6.5.13",
|
||||
|
@ -20,6 +20,7 @@ import { Mutex } from "async-mutex"
|
||||
import { getStaticResourcesFromPlugins } from "./plugins"
|
||||
import { randomIdNonSecure } from "./util/random"
|
||||
import { ChangeEvent } from "./plugins/types"
|
||||
import { minimatch } from "minimatch"
|
||||
|
||||
type ContentMap = Map<
|
||||
FilePath,
|
||||
@ -117,11 +118,23 @@ async function startWatching(
|
||||
})
|
||||
}
|
||||
|
||||
const gitIgnoredMatcher = await isGitIgnored()
|
||||
const buildData: BuildData = {
|
||||
ctx,
|
||||
mut,
|
||||
contentMap,
|
||||
ignored: await isGitIgnored(),
|
||||
ignored: (path) => {
|
||||
if (gitIgnoredMatcher(path)) return true
|
||||
const pathStr = path.toString()
|
||||
for (const pattern of cfg.configuration.ignorePatterns) {
|
||||
if (minimatch(pathStr, pattern)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
},
|
||||
|
||||
changesSinceLastBuild: {},
|
||||
lastBuildMs: 0,
|
||||
}
|
||||
|
@ -10,7 +10,9 @@ export class QuartzLogger {
|
||||
private readonly spinnerChars = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
|
||||
|
||||
constructor(verbose: boolean) {
|
||||
this.verbose = verbose
|
||||
const isInteractiveTerminal =
|
||||
process.stdout.isTTY && process.env.TERM !== "dumb" && !process.env.CI
|
||||
this.verbose = verbose || !isInteractiveTerminal
|
||||
}
|
||||
|
||||
start(text: string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user