pages235/prismarine-viewer/viewer/prepare/postinstall.ts
2024-04-15 05:44:25 +03:00

12 lines
354 B
TypeScript

import path from 'path'
import fs from 'fs'
const publicPath = path.resolve(__dirname, '../../public')
const texturesPath = path.join(publicPath, 'textures')
if (fs.existsSync(texturesPath) && !process.argv.includes('-f')) {
console.log('textures folder already exists, skipping...')
process.exit(0)
} else {
import('./generateTextures')
}