UNPKG

@bscotch/sprite-source

Version:

Art pipeline scripting module for GameMaker sprites.

33 lines 1.6 kB
import { z } from 'zod'; import { jsonSchemaRemoteDir } from './constants.js'; const spriteDestSourceSchema = z.looseObject({ source: z .string() .describe('Path to a configured Sprite Source directory. Either absolute or relative to the GameMaker project folder.'), collaboratorSources: z .string() .array() .optional() .describe("Paths to other SpriteSource directories that may overlap with this source. Any sprites that are found in the source *and* one or more collaborator sources must be the latest in 'source' for it to be imported as part of the pipeline."), ignore: z .array(z.string()) .nullable() .optional() .describe('Pattern to match against the folder path (relative to the SpriteSource root, using POSIX seps) for it to be skipped during import. If omitted, all sprites are included. Converted to a regex with `new RegExp(ignore)`.'), prefix: z .string() .optional() .describe('Prefix to add to the sprite name when adding to the project as a sprite asset.'), }); const schemaFilename = 'stitch.sprite-imports.schema.json'; const remoteFilename = `${jsonSchemaRemoteDir}/${schemaFilename}`; export const spriteDestConfigSchema = z.object({ $schema: z.string().default(remoteFilename).optional(), sources: z.array(spriteDestSourceSchema).default([]).optional(), }); export const spriteDestConfigInfo = { schema: spriteDestConfigSchema, name: 'Sprite Import Configuration', filename: schemaFilename, }; //# sourceMappingURL=SpriteDest.schemas.js.map