@slater/sync

1.8.0 • Public • Published

@slater/sync

Sync files between your local machine and a remote Shopify theme.

Install

npm i @slater/sync -g

Getting Started

Create a slater.config.js file, and define one or more themes:

module.exports = {
  themes: {
    development: {
      id: '12345...',
      password: 'abcde...',
      store: 'store-name.myshopify.com',
      ignore: []
    },
    production: { ... }
  }
}

Then, use the CLI to sync or unsync files or directories:

slater-sync sync snippets/header.liquid # file
slater-sync sync snippets/ # directory
slater-sync unsync snippets/header.liquid

Commands

sync

Sync a file or directory.

slater-sync sync snippets/header.liquid # file
slater-sync sync snippets/ # directory

unsync

Un-sync a file or directory.

slater-sync unsync snippets/header.liquid # file
slater-sync unsync snippets/ # directory

API

@slater/sync can also be used in node, as it is in @slater/cli.

const sync = require('@slater/sync')

const theme = sync({
  id: '12345...',
  password: 'abcde...',
  store: 'store-name.myshopify.com',
  ignore: []
})

Methods

sync

// single file
theme.sync('./build/snippets/nav.liquid')

// multiple files
theme.sync([
  './build/snippets/nav.liquid',
  './build/templates/index.liquid'
])

// or a directory
theme.sync([
  './build/snippets/'
])

unsync

theme.unsync([ 'templates/index.liquid' ])

License

MIT License © The Couch

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.8.048latest

Version History

VersionDownloads (Last 7 Days)Published
1.8.048
1.7.20
2.1.20
2.1.00
2.0.30
2.0.20
2.0.10
2.0.00
1.6.00
1.5.32
1.5.20
1.5.10
1.5.00
1.4.10
1.4.00
1.3.30
1.3.21
1.3.10
1.2.40
1.2.30
1.2.20
1.2.10
1.2.00
1.1.30
1.1.20
1.1.11
1.1.00
1.0.40
1.0.30
1.0.01
1.0.0-alpha.160
1.0.0-alpha.150
1.0.0-alpha.140
1.0.0-alpha.130
1.0.0-alpha.120
1.0.0-alpha.110
1.0.0-alpha.100
1.0.0-alpha.90
1.0.0-alpha.80
1.0.0-alpha.70
1.0.0-alpha.60
1.0.0-alpha.50
1.0.0-alpha.40
1.0.0-alpha.31
1.0.0-alpha.21
1.0.0-alpha.10

Package Sidebar

Install

npm i @slater/sync

Weekly Downloads

55

Version

1.8.0

License

MIT

Unpacked Size

399 kB

Total Files

97

Last publish

Collaborators

  • estrattonbailey
  • iamkevingreen