The file structure of text pulled down via the CLI
./ditto
folder relative to the current working directory, but the location of the output files can be customized by defining the outDir
property in your config.yml file or by setting the environment variable DITTO_OUT_DIR
.
./ditto
Directory./ditto/config.yml
) used by the CLI and is also the default write destination for any output files the CLI writes to disk. It can be overwritten using the --config
flag or by setting the environment variable DITTO_PROJECT_CONFIG_FILE
.
If you run the CLI and the resolved config file does not exist, the CLI will automatically create a default config.yml file at the path specified.
project_id
: the Developer ID of the project.variant_id
: the Developer ID of a variant or base
for files generated for non-variant textextension
: the file extension that corresponds to the configured format(s)-
and _
) removed.
variables.json
file will be generated that contains information about any variables used within the fetched projects. The file has the following format:
framework
can be provided. The framework generates additional helper files to assist with using the output strings files with common third party libraries. Currently only i18next is supported.
JSON
Supported Properties:
type: “commonjs” | “module” (default “commonjs”)
commonjs
syntax. This property configures the output to us commonjs
or module
syntax in the generated files.
Details:
Generates an additional javascript file that imports the generated strings files, and exports an object with the json strings grouped by their variants.