UNPKG

scratch-storage

Version:

Load and store project and asset files for Scratch 3.0

12 lines (10 loc) 281 B
const fs = require('fs'); module.exports = { process (_sourceText, sourcePath) { const buffer = fs.readFileSync(sourcePath); const array = buffer.toJSON().data; return { code: `module.exports = Buffer.from([${array}]);` }; } };