mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-21 21:45:42 -05:00
This fixes the issues with build --serve
This commit is contained in:
parent
f7f33444ca
commit
1522571039
@ -406,7 +406,7 @@ export async function handleBuild(argv) {
|
|||||||
|
|
||||||
const result = await ctx.rebuild().catch((err) => {
|
const result = await ctx.rebuild().catch((err) => {
|
||||||
console.error(`${styleText("red", "Couldn't parse Quartz configuration:")} ${fp}`)
|
console.error(`${styleText("red", "Couldn't parse Quartz configuration:")} ${fp}`)
|
||||||
console.log(`Reason: ${styleText("grey", err.message ?? String(err))}`)
|
console.log(`Reason: ${styleText("gray", err.message ?? String(err))}`)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
})
|
})
|
||||||
release()
|
release()
|
||||||
@ -483,7 +483,7 @@ export async function handleBuild(argv) {
|
|||||||
status >= 200 && status < 300
|
status >= 200 && status < 300
|
||||||
? styleText("green", `[${status}]`)
|
? styleText("green", `[${status}]`)
|
||||||
: styleText("red", `[${status}]`)
|
: styleText("red", `[${status}]`)
|
||||||
console.log(statusString + styleText("grey", ` ${argv.baseDir}${req.url}`))
|
console.log(statusString + styleText("gray", ` ${argv.baseDir}${req.url}`))
|
||||||
release()
|
release()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -494,7 +494,7 @@ export async function handleBuild(argv) {
|
|||||||
})
|
})
|
||||||
console.log(
|
console.log(
|
||||||
styleText("yellow", "[302]") +
|
styleText("yellow", "[302]") +
|
||||||
styleText("grey", ` ${argv.baseDir}${req.url} -> ${newFp}`),
|
styleText("gray", ` ${argv.baseDir}${req.url} -> ${newFp}`),
|
||||||
)
|
)
|
||||||
res.end()
|
res.end()
|
||||||
}
|
}
|
||||||
@ -570,7 +570,7 @@ export async function handleBuild(argv) {
|
|||||||
.on("change", () => build(clientRefresh))
|
.on("change", () => build(clientRefresh))
|
||||||
.on("unlink", () => build(clientRefresh))
|
.on("unlink", () => build(clientRefresh))
|
||||||
|
|
||||||
console.log(styleText("grey", "hint: exit with ctrl+c"))
|
console.log(styleText("gray", "hint: exit with ctrl+c"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ export async function handlePluginSearch(query) {
|
|||||||
const searchQuery = query || "quartz-plugin"
|
const searchQuery = query || "quartz-plugin"
|
||||||
|
|
||||||
console.log(`Searching npm for packages matching "${searchQuery}"...`)
|
console.log(`Searching npm for packages matching "${searchQuery}"...`)
|
||||||
console.log(styleText("grey", "(This may take a moment)\n"))
|
console.log(styleText("gray", "(This may take a moment)\n"))
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = execSync(`npm search ${searchQuery} --json`, { encoding: "utf-8" })
|
const result = execSync(`npm search ${searchQuery} --json`, { encoding: "utf-8" })
|
||||||
@ -96,7 +96,7 @@ export async function handlePluginSearch(query) {
|
|||||||
for (const pkg of quartzPlugins.slice(0, 20)) {
|
for (const pkg of quartzPlugins.slice(0, 20)) {
|
||||||
console.log(` ${styleText("cyan", pkg.name)}@${pkg.version}`)
|
console.log(` ${styleText("cyan", pkg.name)}@${pkg.version}`)
|
||||||
if (pkg.description) {
|
if (pkg.description) {
|
||||||
console.log(` ${styleText("grey", pkg.description)}`)
|
console.log(` ${styleText("gray", pkg.description)}`)
|
||||||
}
|
}
|
||||||
console.log()
|
console.log()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user