You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
livestock-trading/scripts/copy-ezuikit-static.js

16 lines
666 B

import { cpSync, existsSync, mkdirSync } from 'node:fs'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
const rootDir = resolve(dirname(fileURLToPath(import.meta.url)), '..')
const sourceDir = resolve(rootDir, 'node_modules/ezuikit-js/ezuikit_static')
const targetDir = resolve(rootDir, 'public/ezuikit_static')
if (!existsSync(sourceDir)) {
console.warn('[copy-ezuikit-static] skip: ezuikit-js static files not found')
process.exit(0)
}
mkdirSync(dirname(targetDir), { recursive: true })
cpSync(sourceDir, targetDir, { recursive: true, force: true })
console.log('[copy-ezuikit-static] copied to public/ezuikit_static')