Shopify / themekit

Shopify theme development command line tool.
https://shopify.dev/tools/theme-kit
MIT License
1.19k stars 375 forks source link

Theme download into specific directory #483

Closed iamkeir closed 6 years ago

iamkeir commented 6 years ago

Query rather than bug:

Wondered if it was possible to have theme download target a specific directory, e.g. theme download --dir=src downloads the theme in config to a subfolder of src/

This would be useful in allowing the Theme Kit commands in Slate: https://github.com/Shopify/slate/issues/255

tanema commented 6 years ago

I see that these flags are not on the documentation and I will update that however, you can see all the flags on any command by running the command with the help flag. You can see the output here.

➜  theme download --help
Download will download specific files from shopify servers if provided file names.
If no filenames are provided then download will download every file in the project
and write them to disk.

For more documentation please see http://shopify.github.io/themekit/commands/#download

Usage:
  theme download <filenames> [flags]

Flags:
  -f, --force   disable version checking and force all changes

Global Flags:
  -c, --config string         path to config.yml (default "/Users/timanema/workspace/can-i-buy-a-feeling/config.yml")
  -d, --dir string            directory that command will take effect. (default current directory)
  -e, --env string            environment to run the command
      --ignored-file string   A single file to ignore, use the flag multiple times to add multiple.
      --ignores string        A path to a file that contains ignore patterns.
      --no-ignore             Will disable config ignores so that all files can be changed
      --no-update-notifier    Stop theme kit from notifying about updates.
  -p, --password string       theme password. This will override what is in your config.yml
      --proxy string          proxy for all theme requests. This will override what is in your config.yml
  -s, --store string          your shopify domain. This will override what is in your config.yml
  -t, --themeid string        theme id. This will override what is in your config.yml
      --timeout duration      the timeout to kill any stalled processes. This will override what is in your config.yml
  -v, --verbose               Enable more verbose output from the running command.

edit:

The dir flag is specifically how slate uses themekit for operations.

iamkeir commented 6 years ago

Thank you SOOOO MUCH @tanema!!!