mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
21 lines
504 B
JavaScript
21 lines
504 B
JavaScript
import fs from "fs"
|
|
import path from "path"
|
|
import postcss from "postcss"
|
|
|
|
import autoprefixer from "autoprefixer"
|
|
import postCssNested from "postcss-nested"
|
|
|
|
const from = path.join(process.cwd(), "src/lib/pages/styles.css")
|
|
const css = fs.readFileSync(from)
|
|
|
|
const processedCss = await postcss([
|
|
autoprefixer,
|
|
postCssNested,
|
|
]).process(css, { from })
|
|
|
|
fs.writeFileSync(
|
|
path.join(process.cwd(), "src/lib/pages/styles.ts"),
|
|
`export default \`${processedCss.css}\`
|
|
// Generated by \`pnpm css\``
|
|
)
|