21 lines
744 B
JavaScript
21 lines
744 B
JavaScript
const decompress = require('decompress');
|
|
const fs = require('fs');
|
|
|
|
extract("1.8")
|
|
// extract("1.20.1")
|
|
|
|
function extract(string) {
|
|
decompress(`test/${string}.zip`, `out/${string}`).then(files => {
|
|
console.log("extracted")
|
|
// try {
|
|
// fs.renameSync(`out/${string}/assets/minecraft/textures/blocks`, `out/${string}/assets/minecraft/textures/block`)
|
|
// fs.renameSync(`out/${string}/assets/minecraft/textures/items`, `out/${string}/assets/minecraft/textures/item`)
|
|
// } catch (error) {
|
|
// console.log(error);
|
|
// }
|
|
files.forEach(element => {
|
|
// console.log(`Extracted ${element.path} from ${string}.zip`)
|
|
console.log(files)
|
|
})
|
|
})
|
|
} |