Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/excaliburjs/create-excalibur. A repo bootstrapping tool to get you started making your first games!
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435import { alert, log } from './console.js';import { execSync } from 'child_process';import * as fs from 'fs';
export function runCommand(command) { try { execSync(`${command}`, { stdio: 'inherit' }); } catch (e) { alert(`Failed to execute ${command}.`); log(e); return false; } return true;}export function readFile(path, encoding = 'utf-8') { return fs.readFileSync(path, encoding);}export function writeFile(path, content, encoding = 'utf-8') { fs.writeFileSync(path, content, encoding);}export function removeFile(path) { try { fs.unlinkSync(path); } catch (err) { console.error(err.message); }}export function removeFolder(path) { try { fs.rmSync(path, { recursive: true, force: true }); } catch (err) { console.error(err.message); }}