@syncify/cli
Version:
The new generation build tool for Shopify theme development.
241 lines (173 loc) • 13.6 kB
Markdown
<br>
<p align="center">
<a href="https://syncify.sh">
<img src="https://raw.githubusercontent.com/panoply/syncify/3b7839da26b4355943c94ddf93f81e2f41a6a2bf/assets/logo-text.svg"
width="270px">
</a>
</p>
<h1></h1>
Syncify is a specialized tool designed for Shopify theme development. It offers an array of features that significantly enhance productivity, integration and workflow on the Shopify platform. Created to address the mediocrity of OSS (theme dev) offerings from the Shopify team, Syncify delivers a sophisticated, high-performance, and customizable toolkit that streamlines workflows and integrates with modern tooling.
<h4>
Read Documentation ➠ https://syncify.sh
</h4>
### Why Use Syncify?
If you are seeking a tool that has considered requirement factors across the modern Shopify Theme Development ecosystem, and would like a solution that produces performance-focused optimizations at the development process level with features designed for the complexities of modern e-commerce, see the below core capabilities offerred by Syncify:
<i><strong>✓ <samp>Custom input → output directory structures for tailored project organization.</samp></strong></i><br>
<i><strong>✓ <samp>Compiling TypeScript, JavaScript, TSX, and JSX to support modern web development practices</samp></strong></i><br>
<i><strong>✓ <samp>Tailwind, PostCSS, and SASS stylesheet support for advanced CSS management</samp></strong></i><br>
<i><strong>✓ <samp>Terse minification of Markup and Liquid to optimize performance</samp></strong></i><br>
<i><strong>✓ <samp>Static pages with Markdown → Markup transformation for content creation flexibility</samp></strong></i><br>
<i><strong>✓ <samp>Metafield, Redirects, and Navigation synchronization for seamless data management</samp></strong></i><br>
<i><strong>✓ <samp>Version Controlled theme distribution ensuring consistency and traceability</samp></strong></i><br>
<i><strong>✓ <samp>Shared Schemas as a superset implementation for enhanced data modeling</samp></strong></i><br>
<i><strong>✓ <samp>Frontmatter controlled liquid level configuration to fine-tune template behavior</samp></strong></i><br>
<i><strong>✓ <samp>SVG transform and sprite generation processing for efficient icon and graphic handling</samp></strong></i><br>
<i><strong>✓ <samp>Multistore and theme parallel synchronization to manage multiple storefronts</samp></strong></i><br>
<i><strong>✓ <samp>Websocket HOT Reloads with CFH control and morphing for real-time development feedback</samp></strong></i><br>
<i><strong>✓ <samp>Git-based automations with CI baked integrations for streamlined development workflows</samp></strong></i><br>
<h1></h1>
### Examples / Themes
The [Syncify Straps](https://github.com/SyncifyCLI) github organization provides a collection of usage examples and starting point themes using Syncify. You can use the command line to generate new projects with the available straps.
### Editor Intergration
For an integrated development experience in your text editor, please consider using the [VSCode Liquid](https://github.com/panoply/vscode-liquid) extension which has built-in support for Syncify. VSCode Liquid is an independent alternative to the Shopify backed extension.
### Getting Help?
Join the [Shopify Developers Discord](https://discord.gg/shopify-developers-597504637167468564) and ask your questions in the **`# syncify`** channel under the **`projects`** tab. Connect with other developers, maintainers, and contributors already using Syncify in their projects or within their agency.
# Installation
You can install Syncify as a development dependency or globally. There are a couple of different versions available, all of which can be consumed via the NPM Registry. Please consider using [pnpm](https://pnpm.js.org/en/cli/install) as your package manager for a faster and better experience with Syncify and NodeJS development. For all releases and available versions refer to **[syncify.sh/releases](https://syncify.sh/releases)** page.
<samp align="center">
<strong>
<br>
<table><tr><td>
<h3> GLOBAL INSTALL ⮂ SY CLI BINARY </h3>
Install Syncify globally to make the CLI binary available system-wide so you can use commands anywhere on your computer. The <a href="https://github.com/panoply/syncify/tree/next/packages/config/packages/config">/config</a> package can be leveraged on a per-project basis along side global installations for configuration file TypeScript support.
<br>
</td></tr></table>
</strong>
</samp>
## Stable Release
The most stable and latest version of Syncify is available for consumption via the [NPM Registry](https://www.npmjs.com/package/@syncify/cli).
```bash
pnpm add /cli --global
```
## Nightly Release
The nightly releases of Syncify can be installed using the ` ` version tag via NPM, code is on [next](https://github.com/panoply/syncify/tree/next) branch.
```bash
pnpm add /cli --global
```
## Unstable Release
The unstable releases of Syncify can be installed using the ` ` version tag via NPM, code is on [unstable](https://github.com/panoply/syncify/tree/unstable) branch.
```bash
pnpm add /cli --global
```
# Packages
This repository hosts a collection of sub-packages available for download through the NPM Registry. Each package includes a detailed **readme** that provides comprehensive insights into its specific use cases, functionality, and implementation details. All packages can be used standalone, independently of the Syncify CLI.
- [/acquire](https://github.com/panoply/syncify/tree/next/packages/acquire)
- [/ansi](https://github.com/panoply/syncify/tree/next/packages/ansi)
- [/codeframe](https://github.com/panoply/syncify/tree/next/packages/codeframe)
- [/codegen](https://github.com/panoply/syncify/tree/next/packages/codegen)
- [/config](https://github.com/panoply/syncify/tree/next/packages/config)
- [/glue](https://github.com/panoply/syncify/tree/next/packages/glue)
- [/hot](https://github.com/panoply/syncify/tree/next/packages/hot)
- [/json](https://github.com/panoply/syncify/tree/next/packages/json)
- [/kill](https://github.com/panoply/syncify/tree/next/packages/kill)
- [/schema](https://github.com/panoply/syncify/tree/next/packages/schema)
- [/tests](https://github.com/panoply/syncify/tree/next/packages/tests)
- [/timer](https://github.com/panoply/syncify/tree/next/packages/timer)
- [/turndown](https://github.com/panoply/syncify/tree/next/packages/turndown)
- [/types](https://github.com/panoply/syncify/tree/next/packages/types)
- [/update](https://github.com/panoply/syncify/tree/next/packages/update)
- [/uws](https://github.com/panoply/syncify/tree/next/packages/uws)
<details>
<summary>
Config Packages
</summary>
<p>
- [/eslint-config](https://github.com/panoply/syncify/tree/next/configs/eslint-config)
- [/prettier-config](https://github.com/panoply/syncify/tree/next/configs/prettier-config)
- [/stylelint-config](https://github.com/panoply/syncify/tree/next/configs/stylelint-config)
- [/tsconfig](https://github.com/panoply/syncify/tree/next/configs/tsconfig)
</p>
</details>
# Contributing
Contributions are welcome! This project is a monorepo managed with [pnpm](https://pnpm.js.org/) and [changesets](https://github.com/changesets). Dependencies follow the [workspace protocol](https://pnpm.io/workspaces#workspace-protocol-workspace), ensuring a symlinked structure with pnpm managing NPM registry versions. The [packages](/packages/) directory contains modules consumed by the core [syncify](/syncify/) module. To contribute bug fixes or enhancements, you'll need to fork or clone the entire project. Development is designed for use with [VS Code](https://code.visualstudio.com/), and maintaining consistency within this setup is encouraged.
<details>
<summary>
Pre-requisites
</summary>
<p>
- [Git](https://git-scm.com/)
- [Node v20^](https://nodejs.org/)
- [Pnpm v9^](https://pnpm.js.org/)
- [VSCode](https://code.visualstudio.com/)
> _The `.vscode` workspace settings include all the necessary configurations for the project, ensuring a seamless development environment. It also provides tailored extension recommendations to enhance productivity and maintain consistency._
</p>
</details>
<details>
<summary>
Third Parties (optional)
</summary>
<p>
- [Potion Theme](https://marketplace.visualstudio.com/items?itemName=sissel.material-potion)
- [Github Desktop](https://desktop.github.com/)
- [iTerm2](https://iterm2.com/)
> _While not required, if you wish to recreate the environment in which this project is developed then you can install and leverage the above additional third-party tooling._
</p>
</details>
<details>
<summary>
Installation
</summary>
<p>
- Ensure [pnpm](https://pnpm.js.org/) is installed globally `npm i pnpm -g`
- Leverage `pnpm env` if you need to align node versions.
- Clone this repository `git clone https://github.com/panoply/syncify.git`
- Run `pnpm i` in the root directory
- Run `pnpm build` which will bundle all packages
</p>
</details>
## Development Guide
All packages are compiled using [ESBuild](https://esbuild.github.io/) through [tsup](https://tsup.egoist.sh). You can either cd into any package directory to run commands, or from the workspace root, you can execute pnpm dev. The pnpm dev command initializes development in watch mode and concurrently compiles both the core [syncify](/syncify/) package and the [docs](/docs/). Keep in mind that Syncify is distributed as CommonJS (CJS) but is compatible with ES modules (ESM) as it exports as a CLI Binary.
### Per Package
```bash
pnpm dev # Watch and build modes
pnpm build # Build mode only (production)
```
> [!NOTE]
> Almost all packages will expose the above commands via `package.json` script, with some exceptions depending on module. The `pnpm build` command however is available within all modules.
### Recursive (Workspace Root)
```bash
pnpm build # Build production bundles for all modules and packages
```
### Targeting (Workspace Root)
```bash
pnpm <cmd> # Targets the documentation SSG directory
pnpm <cmd> # Targets the /acquire acquire config bundle
pnpm <cmd> # Targets the /ansi CLI enhancement package
pnpm <cmd> # Targets the /config configuration package
pnpm <cmd> # Targets the /glue Glue utility package
pnpm <cmd> # Targets the /codeframe Codeframe CLI package
pnpm <cmd> # Targets the /codegen Codegen generator helper
pnpm <cmd> # Targets the /hot HOT Reloading client
pnpm <cmd> # Targets the /json JSON parser and differ
pnpm <cmd> # Targets the /kill process kill package
pnpm <cmd> # Targets the /turndown reversed markdown parser
pnpm <cmd> # Targets the /timer timing utility
pnpm <cmd> # Targets the /tests internal test utility
pnpm <cmd> # Targets the /update version check utility
pnpm <cmd> # Targets the /uws uWebsockets repackage
pnpm <cmd> # Targets the /cli package (main package)
```
### GraphQL Introspection and Typings
Syncify does not use Shopify OSS offerrings, you will find zero `/*` projects in the codebase. Interfacing with the Shopify API is handled with a custom client. The client is extensively typed and the TypeScript definitions are generated using [codegen](https://the-guild.dev/graphql/codegen). The repository comes with definitions and introspection included so there is no need to pull or regenerate.
# Author / Licensing
Syncify was created and is maintained by [Νικολας Σαββιδης](https://github.com/panoply). Shopify has no affiliation with this project and does not fund Syncify; it is a completely independent solution. Choosing to leverage Syncify helps keep these independent projects alive and sends a clear message to Shopify that the community drives innovation.
### Acknowledgements
Special thanks to the talented developers who have contributed to Syncify. This project has been in development for several years, and without these individuals, it wouldn't have progressed this far.
- [Kim Skinner](https://github.com/WolfGreyDev)
- [Taksh](https://github.com/taksh108)
- [Mansedan](https://github.com/webdeveman)
- [David Warrington](https://ellodave.dev)
### Donate / Sponsor
If you are an **individual** looking to express gratitude financially, I would much prefer you donate to your local animal shelter and share the story with me on [X](https://x.com/niksavvidis). If you are a business, agency, or representing an enterprise using Syncify and interested in discussing partnerships, opportunities, or custom solutions, you can reach me via [email](mailto:n.savvidis@gmx.com) or message me on [X](https://x.com/niksavvidis).
### License
The project is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).