mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
28 lines
551 B
JavaScript
28 lines
551 B
JavaScript
const fs = require('fs').promises
|
|
const path = require('path')
|
|
|
|
function generateCssr (literal) {
|
|
return `export default \`${literal}\`\n`
|
|
}
|
|
|
|
;(async () => {
|
|
const file = await fs.readFile(
|
|
path.resolve(
|
|
__dirname,
|
|
'..',
|
|
'node_modules',
|
|
'vue-virtual-scroller',
|
|
'dist',
|
|
'vue-virtual-scroller.css'
|
|
)
|
|
)
|
|
const cssLiteral = file.toString()
|
|
await fs.writeFile(path.resolve(
|
|
__dirname,
|
|
'..',
|
|
'src',
|
|
'_global-style/',
|
|
'vue-virtual-scroller.cssr.js'
|
|
), generateCssr(cssLiteral))
|
|
})()
|