From 43535d80cc23a9b3db91fa4283e5aeb5f1b19521 Mon Sep 17 00:00:00 2001 From: Carson Shold Date: Wed, 1 Feb 2017 13:09:20 -0500 Subject: [PATCH] Add documentation for migrate command --- docs/commands/index.md | 10 ++++++++++ docs/index.md | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/commands/index.md b/docs/commands/index.md index 5ac224be6..8474e8d09 100644 --- a/docs/commands/index.md +++ b/docs/commands/index.md @@ -9,6 +9,7 @@ layout: default | Command | Usage | | :------ | :---- | | [theme](#theme) | `slate theme [name]` | +| [migrate](#migrate) | `slate migrate` | | [help](#help) | `slate -h` | | [version](#version) | `slate -v` | @@ -20,6 +21,15 @@ slate theme [name] Generate a new blank theme. The `name` argument is required for the new theme directory. +### migrate +``` +slate migrate +``` + +Converts an existing theme to work with Slate. Run this command from your project root to install dependencies and restructure your theme files into a `src/` directory. Empty `icons/`, `styles/`, and `scripts/` folders will also be created. + +Create `config.yml` in your root using [this sample file](https://github.com/Shopify/slate/blob/master/config-sample.yml), then use [theme commands](#theme-commands) to start developing. + ### help ``` diff --git a/docs/index.md b/docs/index.md index bd66bba55..a52516caa 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,12 +13,12 @@ Slate allows you to sync local files with your live shop, deploy to multiple env > [Node](https://nodejs.org/en/) 4+ is supported, but 6+ is recommended to fully benefit from Slate. If you want the template files without the build tools, [get the latest zip here](https://sdks.shopifycdn.com/slate/latest/slate-src.zip). 1. Install Slate with `npm install -g @shopify/slate`. -2. Create a new theme with `slate theme theme-name`, where `theme-name` will be a newly created folder. +2. Create a new theme with `slate theme theme-name`, where `theme-name` will be a newly created folder. If you already have a theme locally, you can use the `slate migrate` command and [follow these steps](/slate/commands/#migrate) instead. 3. Create a private app on your development store(s). * Not sure how to create a private app? [Learn how here](https://help.shopify.com/api/guides/api-credentials#get-credentials-through-the-shopify-admin). * Set the "Theme templates and theme assets" permission to "Read and write". Private app permission requirements -4. Rename `config-sample.yml` to `config.yml` and add your private app credentials: +4. Rename `config-sample.yml` to `config.yml` and add your private app credentials. * **store:** the shopify-specifc URL for this store/environment (ie. my-store.myshopify.com) * **theme_id:** the unique id for the theme you want to write to when deploying to this store. You can find this information in the URL of the theme's online editor at Shopify [admin/themes](https://shopify.com/admin/themes). Alternatively, you can use `"live"` for the published theme. Private app credentials @@ -30,6 +30,7 @@ Slate allows you to sync local files with your live shop, deploy to multiple env ### Global * `slate theme [name]` - Generate a new blank theme +* `slate migrate` - Convert an existing theme to work with Slate * `slate -h` - Options available in your current directory (differs if not in a theme) * `slate -v` - See your currently installed version of Slate and dependencies