()
| 70 | }; |
| 71 | |
| 72 | const buildSetup = () => { |
| 73 | if (fs.existsSync(buildDir)) { |
| 74 | fs.rmdirSync(buildDir, { recursive: true }); |
| 75 | } |
| 76 | fs.mkdirSync(buildDir); |
| 77 | }; |
| 78 | |
| 79 | const saveLayer = (_canvas, _edition) => { |
| 80 | fs.writeFileSync(`${buildDir}/${_edition}.png`, _canvas.toBuffer("image/png")); |