mirror of
https://github.com/alrayyes/wiki.git
synced 2025-04-30 14:24:12 +00:00
make ci also run on windows, re-add css minification
This commit is contained in:
parent
9a0f20012a
commit
429f331c21
3 changed files with 18 additions and 7 deletions
quartz
|
@ -11,7 +11,7 @@ import { intro, isCancel, outro, select, text } from "@clack/prompts"
|
|||
import { rimraf } from "rimraf"
|
||||
import prettyBytes from "pretty-bytes"
|
||||
import { spawnSync } from "child_process"
|
||||
import { transform } from "lightningcss"
|
||||
import { transform as cssTransform } from "lightningcss"
|
||||
|
||||
const UPSTREAM_NAME = "upstream"
|
||||
const QUARTZ_SOURCE_BRANCH = "v4-alpha"
|
||||
|
@ -115,6 +115,7 @@ async function stashContentFolder(contentFolder) {
|
|||
}
|
||||
|
||||
async function popContentFolder(contentFolder) {
|
||||
await fs.promises.rm(contentFolder, { force: true, recursive: true })
|
||||
await fs.promises.cp(contentCacheFolder, contentFolder, {
|
||||
force: true,
|
||||
recursive: true,
|
||||
|
@ -304,6 +305,14 @@ See the [documentation](https://quartz.jzhao.xyz) for how to get started.
|
|||
sassPlugin({
|
||||
type: "css-text",
|
||||
cssImports: true,
|
||||
async transform(css) {
|
||||
const { code } = cssTransform({
|
||||
filename: "style.css",
|
||||
code: Buffer.from(css),
|
||||
minify: true,
|
||||
})
|
||||
return code.toString()
|
||||
},
|
||||
}),
|
||||
{
|
||||
name: "inline-script-loader",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue