site-theme-cli
v1.0.2Code Coverage
Statements | Branches | Functions | Lines |
---|---|---|---|
Usage
$ npm install -g site-theme-cli
$ site-theme-cli COMMAND
running command...
$ site-theme-cli (--version)
site-theme-cli/1.0.2 linux-x64 node-v18.17.0
$ site-theme-cli --help [COMMAND]
USAGE
$ site-theme-cli COMMAND
...
Commands
site-theme-cli auth ACCESSTOKEN
site-theme-cli help [COMMANDS]
site-theme-cli theme install
site-theme-cli theme preview
site-theme-cli theme pull
site-theme-cli theme push
site-theme-cli theme watch
site-theme-cli auth ACCESSTOKEN
Authorizes Square Online CLI with Access Token.
USAGE
$ site-theme-cli auth ACCESSTOKEN [--verbose] [-f] [--skipPermissionsCheck]
ARGUMENTS
ACCESSTOKEN Square Connect Access Token
FLAGS
-f, --force Overwrite existing Access Token
--skipPermissionsCheck Skip the permissions check for Access Token. By default this will check to see that the token
has all the required permissions
GLOBAL FLAGS
--verbose Print all API logs in console.
DESCRIPTION
Authorizes Square Online CLI with Access Token.
Visit https://developer.squareup.com/ for more information.
EXAMPLES
$ site-theme-cli auth SQUARE_CONNECT_ACCESS_TOKEN
site-theme-cli help [COMMANDS]
Display help for site-theme-cli.
USAGE
$ site-theme-cli help [COMMANDS] [-n]
ARGUMENTS
COMMANDS Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for site-theme-cli.
See code: @oclif/plugin-help
site-theme-cli theme install
Installs theme on a Square Online site.
USAGE
$ site-theme-cli theme install [--verbose] [--siteId <value>]
FLAGS
--siteId=<value> ID of Square Online site on which you would like to install a theme, use to skip site selector step.
GLOBAL FLAGS
--verbose Print all API logs in console.
DESCRIPTION
Installs theme on a Square Online site.
EXAMPLES
$ site-theme-cli theme install
site-theme-cli theme preview
Prints the development preview links for Square Online custom theme sites.
USAGE
$ site-theme-cli theme preview [--verbose] [--siteId <value>]
FLAGS
--siteId=<value> ID of Square Online site to you would like to preview, use to skip site selector step.
GLOBAL FLAGS
--verbose Print all API logs in console.
DESCRIPTION
Prints the development preview links for Square Online custom theme sites.
EXAMPLES
$ site-theme-cli theme preview
site-theme-cli theme pull
Clone Square Online Theme Files Locally
USAGE
$ site-theme-cli theme pull [--verbose] [--siteId <value>] [--accessToken <value>] [--yes] [--themeDir <value>]
FLAGS
--accessToken=<value> Use this flag to pass in an access token. If not passed the CLI will look for an access token
saved during "auth" command.
--siteId=<value> The Square Online site id that you would like to pull files from.
--themeDir=<value> Path to theme directory. If the directory does not exist it will be created.
--yes Use this flag to skip the confirmation prompts
GLOBAL FLAGS
--verbose Print all API logs in console.
DESCRIPTION
Clone Square Online Theme Files Locally
EXAMPLES
$ site-theme-cli theme pull
site-theme-cli theme push
Push your local theme files to your Square Online site. Files with the following patterns will be ignored by default: /_darcs/,/CVS/,/config.yml/,/node_modules/,/.git/,/.DS_Store/,/.soignore/,/.dockerignore/,/.gitmodules/, as well as any patterns within the /.soignore file
USAGE
$ site-theme-cli theme push [--verbose] [--themeDir <value>] [--siteId <value>] [--themeId <value>]
[--omitDelete] [--accessToken <value>] [--yes]
FLAGS
--accessToken=<value> Use this flag to pass in an access token. If not passed the CLI will look for an access token
saved during "auth" command.
--omitDelete If set the CLI will skip any delete operations during syncing
--siteId=<value> The Square Online site id that you would like to push files to.
--themeDir=<value> Path to theme directory.
--themeId=<value> The theme you would like to push files to.
--yes Use this flag to skip the confirmation prompts
GLOBAL FLAGS
--verbose Print all API logs in console.
DESCRIPTION
Push your local theme files to your Square Online site. Files with the following patterns will be ignored by default:
/_darcs/,/CVS/,/config.yml/,/node_modules/,/.git/,/.DS_Store/,/.soignore/,/.dockerignore/,/.gitmodules/, as well as
any patterns within the /.soignore file
EXAMPLES
$ site-theme-cli theme push
site-theme-cli theme watch
Watch your theme directory and automatically upload file changes to Square Online. Files with the following patterns will be ignored by default: /_darcs/,/CVS/,/config.yml/,/node_modules/,/.git/,/.DS_Store/,/.soignore/,/.dockerignore/,/.gitmodules/ as well as any patterns within the /.soignore file
USAGE
$ site-theme-cli theme watch [--verbose] [--themeDir <value>] [--siteId <value>] [--themeId <value>]
[--hotReload] [--omitDelete]
FLAGS
--hotReload Set this flag to print the preview links and enable hot reloading
--omitDelete If set the CLI will skip any delete operations during syncing
--siteId=<value> The id of the Square Online site you would like to sync to.
--themeDir=<value> Path to theme directory for watching.
--themeId=<value> The theme you would like to sync files to.
GLOBAL FLAGS
--verbose Print all API logs in console.
DESCRIPTION
Watch your theme directory and automatically upload file changes to Square Online. Files with the following patterns
will be ignored by default:
/_darcs/,/CVS/,/config.yml/,/node_modules/,/.git/,/.DS_Store/,/.soignore/,/.dockerignore/,/.gitmodules/ as well as any
patterns within the /.soignore file
EXAMPLES
$ site-theme-cli theme watch
CI/CD Usage
The theme pull
and theme push
commands support automated workflows. Passing in an accessToken flag will skip using any on saved through the auth
command. themeDir
flags can be either relative or absolute. yes
will skip any steps that usually require a user confirmation to continue.
site-theme-cli theme pull --siteId=site_693636287506607541 --themeDir=./brisk-theme --accessToken=YOUR_ACCESS_TOKEN --yes
site-theme-cli theme push --siteId=site_693636287506607541 --themeDir=./brisk-theme --accessToken=YOUR_ACCESS_TOKEN --yes
Getting Started
- Install Node.
- Install NVM.
nvm use
npm ci
Homepage
github.com/square/site-theme...Metadata
- MIT
- >=12.0.0
- Rajiv Puri
- released 8/29/2024