sy build
The build command runs Syncify in build mode. In this mode, Syncify processes files from the specified input directory and generates an organised theme structure in the output directory, formatted to comply with Shopify’s requirements. This command is designed for creating a complete, deployable theme package from your source files, ensuring compatibility with Shopify’s theme ecosystem.
# Run build mode
sy build --flags # Flags are optional
sy build <transform> # Run transform specific build
sy build <transform> --flags # Run transform specific build with flags
sy build
-b, --build
In some instances you may require pre-build functionality. Say, for example you want to upload your local theme to a store. This can be done by first running sy build
and then sy push
but you may prefer that such an operation be carried out in a single command line argument. The --build
(or -b
) flag is available to the following modes:
--build # Available in watch mode
sy push --build # Available in push mode
sy pack --build # Available in pack mode
sy publish --build # Available in publish mode
sy watch
sy build <transform>
You can provide Transform targets to sy build
and have Syncify perform build operations on a specific file type.
# Run build on JavaScript/TypeScript
sy build style # Run build on CSS/SASS or Tailwind
sy build svg # Run build on SVG/Sprites transform
sy build json # Run build on JSON specific files
sy build liquid # Run build on Liquid files
sy build script
sy build --flags
The sy build
command accepts several flags that allow you to customize its behavior in build mode. Certain flags can alter how Syncify processes file modifications.
--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.
--clean
Purges files contained in the output directory. You can use this along-side --build to rebuild output in specific modes.