try to add and use shrinko8
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { execa } from "execa";
|
||||
import path from "path";
|
||||
import {fileURLToPath} from 'url';
|
||||
|
||||
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
||||
|
||||
const shrinko8Path = path.resolve(__dirname, "../shrinko8");
|
||||
const pico8DatPath = path.resolve(__dirname, "../../pico8.dat");
|
||||
|
||||
export const shrinko8 = async (props: {
|
||||
inputFile: string;
|
||||
outputFile: string;
|
||||
options?: string[];
|
||||
}) => {
|
||||
const {inputFile, outputFile, options = []} = props;
|
||||
return await execa("python3", [shrinko8Path, inputFile, outputFile, "--pico8-dat", pico8DatPath, ...options])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user