2023-08-09 18:36:27 +03:00
|
|
|
const fsExtra = require('fs-extra')
|
|
|
|
|
|
|
|
exports.copyFiles = () => {
|
2023-08-09 20:38:03 +03:00
|
|
|
fsExtra.copySync('styles.css', 'public/styles.css')
|
2023-08-09 18:36:27 +03:00
|
|
|
fsExtra.copySync('node_modules/prismarine-viewer/public/blocksStates/', 'public/blocksStates/')
|
|
|
|
fsExtra.copySync('node_modules/prismarine-viewer/public/textures/', 'public/textures/')
|
|
|
|
fsExtra.copySync('node_modules/prismarine-viewer/public/worker.js', 'public/worker.js')
|
|
|
|
fsExtra.copySync('node_modules/prismarine-viewer/public/supportedVersions.json', 'public/supportedVersions.json')
|
|
|
|
fsExtra.copySync('assets/', 'public/')
|
|
|
|
fsExtra.copySync('extra-textures/', 'public/extra-textures/')
|
|
|
|
fsExtra.copySync('config.json', 'public/config.json')
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.copyFilesDev = () => {
|
|
|
|
if (fsExtra.existsSync('public/config.json')) return
|
|
|
|
exports.copyFiles()
|
|
|
|
}
|
|
|
|
|
|
|
|
const fn = exports[process.argv[2]]
|
|
|
|
|
|
|
|
if (fn) fn()
|