1.0.1 • Published 1 year ago

@weareeight/armada-sync v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Armada Sync

A utility designed to retrieve and overwrite all template json files for patching a published themes settings to another theme.

This cli surfaces a utility armada-sync or full package @weareeight/armada-sync that takes arguments, finds the published theme, gets a list of files ( settings_data.json and all content in the /templates/ folder) then saves them to a specified path locally.

This is designed to be used in our CI flow, to patch the theme and then overwrite with user controlled data.

Notes:

  • If breaking changes eg setting schema range files these may need manual management
  • If there are non json files in the templates or sub folders and these are amended in the base theme, manual updating of these files will be needed. All template files should be JSON!!!

installation

In theme dev it would be best to install this pacakage either into the theme or install implicitly in the github action.

npm install @weareeight/armada-sync then access from npm scripts in package JSON

Alternately using NPX you can execute and install from latest using

npx --yes @weareeight/armada-sync --ARGS --GO --HERE

Usage

npx @weareeight/armada-sync --shop='something' --token='CustomApDevtoken' --themeFolder='./src/theme'

Arguments

  • --shop='something' this is the store url WITHOUT myshopify.com ( it will try fix it )
  • --token='CustomAppGeneratedKey' Generated through the admin (replaces private app auth)
  • --themeFolder='./src/theme' optional defaults to ./src/theme
  • --themeId='XX' NOT REQUIRED: will pull down from this specific theme ID ---useEnv optional switches the params to dotEnv

Using .env

It is possible to use .env to replace all the arguments pass the cli --useEnv as a flag and add a .env or specify ENV VARS in your CI.

ENV VARS

SHOPIFY_SHOP=shopdomain
SHOPIFY_TOKEN=ShopifyTokenGoesHere

# Optional / not required
SHOPIFY_THEME_FOLDER=./src/theme
SHOPIFY_THEME_ID=not-required

---------------------||||||||||-------------------

Changelog

  • 1.0.0 - add support for section groups
1.0.1

1 year ago

1.0.0

1 year ago

0.1.0

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago