refactor: script name and defaults

This commit is contained in:
cha0s 2024-07-11 15:43:31 -05:00
parent ef744591d2
commit a8d345eebe

View File

@ -6,8 +6,8 @@ import {basename, dirname, extname, join} from 'node:path';
import imageSize from 'image-size';
const tileset = process.argv[2];
let w = parseInt(process.argv[3]);
let h = parseInt(process.argv[4]);
let w = parseInt(process.argv[3] || '0');
let h = parseInt(process.argv[4] || '0');
const {width, height} = imageSize(tileset);