UNPKG

@bscotch/stitch

Version:

Stitch: The GameMaker Studio 2 Asset Pipeline Development Kit.

25 lines 940 B
import { pathy } from '@bscotch/pathy'; import { StitchProject } from '../../lib/StitchProject.js'; import { info } from '../../utility/log.js'; import { normalizeOptions } from './add-base-options.js'; export default async function (options) { options = normalizeOptions(options); const targetProject = await StitchProject.load({ projectPath: options.targetProject, dangerouslyAllowDirtyWorkingDir: options.force, }); info(`Importing updated sprites from source...`, { startTime: new Date(), source: pathy(options.source), target: pathy(targetProject.yypDirAbsolute), }); await targetProject.addSprites(options.source, options); let doneMessage = `Completed importing updated sprites.`; if (options.watch) { doneMessage += ` Watching for changes...`; } info(doneMessage, { endTime: new Date(), }); } //# sourceMappingURL=add-sprites.js.map