Skip to content

Commit

Permalink
Update createZip.js
Browse files Browse the repository at this point in the history
  • Loading branch information
halfmanbear authored Aug 30, 2024
1 parent 3e433c6 commit 232980f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pages/Generator/createZip.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import JSZip from "jszip";

function addFile(zip, type, file) {
let path = `${type}/${file.name}`;
if (!path.endsWith(".json")) {
path += ".json";
}
console.log(`Adding file to zip: ${path} with content:`, file); // Log file content to verify it is not empty
zip.file(path, JSON.stringify(file, null, 2)); // Ensure content is correctly stringified
// Add "-OpenNept4une" to the file name before the .json extension
let path = `${type}/${file.name}-OpenNept4une.json`;

console.log(`Adding file to zip: ${path} with content:`, file.content); // Log file content to verify it is not empty
zip.file(path, JSON.stringify(file.content, null, 2)); // Ensure content is correctly stringified
}

export const createZip = async (printer_profiles, filament_profiles, process_profiles) => {
Expand Down

0 comments on commit 232980f

Please sign in to comment.