ditto-clicommand and choosing the projects you'd like to sync from.
./dittorelative to the current working directory) is consulted as the source of truth for how that command should execute.
dittofolder doesn't exist, one will be automatically created for you.
dittofolder lives a file called
config.yml, which is where all CLI configuration options should be specified; these include which projects should be synced with the current directory, what format data should be stored in, and whether or not variant data should be included.
config.ymlfile, like adding (
ditto-cli project add) or removing (
ditto-cli project remove) projects.
ditto-cli pull- this command will read the list of projects from
ditto/config.ymland use the Ditto API to fetch and store data about those projects in the
dittofolder to be consumed in your application.
ditto/config.ymlis fetched and stored in (a) JSON file(s) in the
pullis executed, all
.jsfiles present in the
dittofolder will be removed before any data is written.
variantsoption is unspecified or set to
ditto/config.yml, all text data will be stored in a single file:
variantsoption is set to
ditto/config.yml, text data will be split across multiple files:
base.jsonwill contain the base text for the specified projects
formatoption is set to
ditto/config.yml, text data will be stored in the specified format. Otherwise, text data will be stored in the default format -- grouped by frames and blocks.
ditto-cli project add
ditto/config.ymlis updated to include the selected option.
ditto/config.ymlalready contains all projects in the workspace that have developer mode enabled.
ditto-cli project remove
ditto/config.ymlare presented in a prompt. When an option is selected, the list of projects in
ditto/config.ymlis updated to exclude the selected option.
ditto/config.ymlon the execution of every command. See a list of the supported options below.
idproperty and a
nameproperty does not have to be an exact match with the name of the project in Ditto, but it will be for any projects added via the
true, text data will be stored across multiple JSON files in the
falseor unspecified, text data will be stored in a single JSON file in the
dittofolder. See the pull command for more details.