Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
Add documentation for migrate command
Browse files Browse the repository at this point in the history
  • Loading branch information
cshold committed Feb 7, 2017
1 parent 2e09cbc commit 43535d8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docs/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |

Expand All @@ -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

```
Expand Down
5 changes: 3 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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".
<img src="{{ "/assets/images/app-permission.jpg" | prepend: site.baseurl }}" alt="Private app permission requirements" class="demo-image demo-image--app">
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.
<img src="{{ "/assets/images/theme-id.png" | prepend: site.baseurl }}" alt="Private app credentials" class="demo-image demo-image--app">
Expand All @@ -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

Expand Down

0 comments on commit 43535d8

Please sign in to comment.