UNPKG

reeco

Version:

Reeco is a CLI that helps you create game with p5.js (or any other graphics/game library) and bring it to your desktop.

15 lines (14 loc) 466 B
const executionDirectory = process.cwd(); const { exec } = require('child_process'); (async () => { try { exec('electron .', { cwd: executionDirectory + '/_build/' }, (err, stdout, stderr) => { if(err) return console.error(err); if(stderr) return console.error(stderr); console.log(stdout); }) } catch(e) { console.log('Failed to run the game'); console.error(e); } })();