ssgen_dart 7.0.0-beta.1
ssgen_dart: ^7.0.0-beta.1 copied to clipboard
Reconverts only the SpriteStudio projects in a folder that changed, over ssconverter_dart: the library behind live reload. Desktop hosts, pure Dart.
ssgen_dart #
Reconvert only the SpriteStudio projects that went stale — a thin
orchestration layer over ssconverter_dart: scan a
directory, compare mtimes against the converted output, and convert what
changed.
Desktop only (macOS / Windows / Linux), pure Dart, and deliberately small:
no CLI, no watcher, no daemon state. One shot per call, triggered by whoever
owns the loop — typically the sswatch runner in
ssgen_flutter, which watches the source tree and pushes
what this reconverted into the running app.
It lives outside ssplayer_flutter on purpose: the
runtime an app ships stays converter-free.
Install #
dart pub add --dev ssgen_dart
ssconverter_dart comes with it (Installation).
Use #
import 'package:ssgen_dart/ssgen_dart.dart';
final SsReconvertReport report = await const SsProjectSync().reconvert();
With no arguments it follows the convention — SpriteStudio_Source/ in,
assets/spritestudio/<stem>/ out — resolved from the current directory, or from
a spritestudio.yaml beside the sources. reconvert() takes projectRoot /
sourceDir / outputDir / embedded to override any of that.
Notes #
- Staleness is an mtime diff over the whole project directory, not just the
.sspj: editing a referenced.ssaeor.pngrebuilds it too, and a project with no output yet always counts as stale. - It converts; it does not reload. Pushing the fresh pack into a running app
is
ssgen_flutter's job (and the player'sreload). - Converting one project by hand, or in CI, is
ssconverter_dart— this package is for the edit-to-runtime loop.
More #
- Live reload — the loop this package sits in
- Live Web demos
- Repository