syncify icon indicating copy to clipboard operation
syncify copied to clipboard

Upcoming Release

Open panoply opened this issue 3 years ago • 7 comments

This project has been around for several years now. The first major release in underway and will ship with breaking changes and also operate under the new name Syncify. There has been a complete overhaul of the current logic. Below are some of the main changes:

New Name

This module will become apart of the Liquify organization in the npm registry. Liquify is a soon to be released Text Editor extension/plugin that I have been working on for the better part of a couple years now that provides developers with modern IDE capabilities and intellisense feature when working with multiple variations of the Liquid templating language. The Liquify project is still ongoing has been delayed for quite some time due to personal and work related reasons. This module is one of many packages to come from the Liquify project and given the relationship to Shopify theme development it will live alongside them.

New Features

Syncify will support all the current features but also introduces a couple new ones.

Metafield Sync A new metafields sync option will allow you to write the contents of JSON files to metafields to your store. It uses a directory structure approach where subdirectories are namespaces and files contained within are identifiers. It is rather simple and elegant.

CLI support for multiple targets The CLI has been overhauled and re-written to support more customized control form the command line. You will be able to upload changes to multiple storefronts and themes without having to rely script usage.

HTML/Liquid minification An addition option for minifying HTML and Liquid code will be provided. This option will transform contents of files into the smallest and safest possible form before uploading to defined themes.

New Configuration

The Syncify configuration options will be defined within package.json files and use the following schema:

{
  "syncify": {
    "dir": "example", // The directory to watch
    "targets": [
      {
        "store": "shop", // The store name
        "themes": {
          "dev": 123456789, // The theme id and target name
          "prod": 123456789 // The theme id and target name
        }
      }
    ]
  }
}

Improvements

The internals were re-written and better handle multiple storefront and theme sync. Faster initialization and far more concise and informative logs. The CLI is the biggest improvement but also script usage adopts a new approach for hooking into file transit.

Upgrading

The current module shopify-sync will be deprecated and inform upon the new install location when you update dependencies. The new package will live under @liquify/syncify. You can track the progress in the next branch.

panoply avatar Dec 20 '21 19:12 panoply

Hi :).

I have a bit of a problem with the package.json approach for specifying config. We are working at two people, and each of us have their own development store. Unfortunately, because the package.json is committed, this means that the ID of the theme must be the same (of course the second dev can change it, but as soon as they push their change then I will get with their reference ID).

As the theme ID is really an env value, I think it should rather belong to the .env file rather than being part of the package.json

bakura10 avatar Jan 31 '22 07:01 bakura10

The new configuration will allow you to target multiple themes and stores from the package.json file. See here https://github.com/panoply/syncify/tree/next#example - where you can set multiple themes for any store. Would that help negate the issue? I can always provide additional option for .env theme id though.

panoply avatar Jan 31 '22 07:01 panoply

I don't think this really help.

For instance in my use case I have a simple NPM script in the package.json, that I run like npm run-script run. This one runs various Gulp tasks, including ShopifySync.

What I want is that each dev can use the same command. As each developer has its own theme, I don't think the package.json approach is good. The theme ID is really an env variable that should not be committed (in the case of multiple people, it is just the theme ID of the developer).

bakura10 avatar Jan 31 '22 07:01 bakura10

No problems. I will build this capability into the next release. The new version aims to take away the burden of Gulp tasks and handle the asset pipelines. Would you be able to try a beta version for me? I'd like to know your use case more and build requirements as needed.

panoply avatar Jan 31 '22 09:01 panoply

Thanks a lot :)

bakura10 avatar Jan 31 '22 09:01 bakura10

Hi @panoply, thank you for your work I am following syncify as it is very inspiring for me. I tried to use sync from the next branch but it didn't work for me. Do I understand correctly that this won't work until you're completely done with it?

slavamak avatar May 10 '22 19:05 slavamak

Privet @slavamak. Thanks for the kind words. You understand correct, until I am completely done, next will not be fully operational. The rebuild got a little feature full so still a little bit more to conclude with but it will be dope when it's ready (lots of really great features in it) - feedback and suggestions are always welcome :). I will pick up on it again very soon as for my day job we will be using it, we actually plan to be implementing it by mid June.

I have a couple of large projects in the works atm which are all geared towards Shopify, most of which will drastically improve SSR development on the platform.

Before Syncify hits the big time, a powerful little library I developed called SPX will ship its first major. Though SPX is not really related to Syncify it will drastically improve the speed and performance of SSR websites and as such Shopify themes that implement will be able to achieve near instantaneous visits between pages. Following SPX will come Syncify. After these projects, I will move onto finalizing Prettify and then lastly I will get onto Liquify.

So a fair bit of stuff to come.

panoply avatar May 10 '22 20:05 panoply