sy watch
The watch command runs Syncify in watch mode. In this mode, Syncify continuously monitors files in the specified input directory for changes. When a file is modified, it writes the updated content to the output directory and then uploads those changes to a Shopify theme/store or target. This keeps the output directory and Shopify environment synchronized with you local version throughout the session.
$ sy watch # Starts watching the project for changes
$ sy watch --flags # Pass an accepted flag to modify watch execution
Flags
The sy watch
command accepts several flags that allow you to customize its behavior in watch mode. Certain flags can alter how Syncify processes file modifications or unlock additional watch mode features, such as enabling HOT Reloads for real-time updates in the Shopify environment.
--target, -T
Target a store, theme or both. The --target flag will reference entries defined in either your package.json or one of the accepted store file types. Multiple expressions are supported.
--filter, -F
Target specific directories or files based on output structures. The --filter flag cannot map or point to input paths and requires you provide patterns based on a theme flat structure.
--hot
Available within watch mode, the --hot
flag will active HOT Reloading.
--align
Aligns a subset .json files changed via the theme customizer. Local versions will be diffed and merged with remote counterparts.
--align
Enables live bindings during watch mode. This will perform interval based polling and diffing on a subset of .json files the theme customizer can augment. Changes will be merged and aligned.
--clean
Purges files contained in the output directory. You can use this along-side --build to rebuild output in specific modes.
--help, -h
The help flag provides detailed assistance by printing help information about the specified Syncify run mode directly in the terminal. When this flag is appended to a command, it halts the execution of that command and instead outputs a clear summary, including usage instructions, available options, and a brief description of the command’s purpose.