Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@bscotch/stitch-config

bscotch439MIT0.7.0TypeScript support: included

Schemas and utilities for the stitch.config.json file.

stitch, bscotch

readme

Stitch Config

Stitch is a collection of tools for managing GameMaker projects, developed by Butterscotch Shenanigans.

Stitch projects make use of some shared libraries and resources. This package provides schemas and utilities to help manage the stitch.config.json file, which lives alongside a GameMaker project's .yyp file and is used for configuration of various Stitch features.

The stitch.config.json file is used for configuration options that:

  • Are specific to the project (i.e. not general configuration)
  • Must be followed by all collaborators on that project
  • Are not machine-dependent nor user-dependent

It should therefore be tracked in your project's Git history.

Usage

Programmatic

You can import the schemas from the main entrypoint:

import { stitchConfigSchema } from '@bscotch/stitch-config';

And a few GameMaker project-management functions from the 'projects' entrypoint:

import {
  findProjectConfigPath,
  ensureProjectConfig, // Initialize a config file
  loadProjectConfig,
  saveProjectConfig,
  applyGroupAssignments, // Apply texture group and audio group assignments from a config to its project
} from '@bscotch/stitch-config/project';

CLI

If you install globally you can use the CLI via stitch-config. Otherwise you can call it in a local install with npx stitch-config.

  • stitch-config init <yypFile>: Ensure a Stitch config file exists for the target project
  • stitch-config sync-groups <yypFile>: The Stitch config allows specifying audio and texture group assignment rules. This command updates the sprites and sounds to follow those rules.