+ +

{{ page.title }}

+ +

On this page

+ + {% include toc.html html=content h_max=2 %} + {{ content }}
diff --git a/docs/app/node/commands/index.md b/docs/app/node/commands/index.md new file mode 100644 index 00000000..90b6e1e5 --- /dev/null +++ b/docs/app/node/commands/index.md @@ -0,0 +1,50 @@ +--- +title: Node app project command reference +section: node +--- + +## create + +- `shopify create node` creates a new Node project in a subdirectory of the current directory. + +## deploy + +Deploy the current Node project to a hosting service. [Heroku](https://www.heroku.com) is currently the only option, +but more will be added in the future. + +- `shopify deploy heroku` deploys the current Node project to Heroku + +## generate + +Generate code in your app project. Supports generating new pages, new billing API calls, or new webhooks. + +- `shopify generate page` generates a new page in your project. +- `shopify generate billing` generates a new billing API call. +- `shopify generate webhook` generates a new webhook. + +## open + +Open your local development app in the default browser. + +- `shopify open` + +## populate +Populate your Shopify development store with example products, customers, or orders. + +- `shopify populate products` +- `shopify populate customers` +- `shopify populate draftorders` + +## serve +Start a local development node server for your project, as well as a public [ngrok](https://ngrok.com/) tunnel to your +localhost. + +- `shopify serve` + +## tunnel +Start or stop an http tunnel to your local development app using ngrok. + +- `shopify tunnel auth` writes an ngrok auth token to `~/.ngrok2/ngrok.yml` to allow connecting with an ngrok account. + [Visit the ngrok site to sign up](https://dashboard.ngrok.com/signup) +- `shopify tunnel start` starts the ngrok tunnel for your app +- `shopify tunnel stop` stops the ngrok tunnel for your app diff --git a/docs/app/node/index.md b/docs/app/node/index.md index 6753c186..fe60ff2e 100644 --- a/docs/app/node/index.md +++ b/docs/app/node/index.md @@ -1,51 +1,33 @@ --- -title: Node.js app projects +title: Node app projects section: node --- -## Node.js app projects +## Getting started -To create a Node project, type `shopify create node`. +1. To create a new Node project, type `shopify create node`. This will scaffold a new Node.js app in a subdirectory. -Once you have created your project, the following commands are available while working in the project directory. + ```sh + $ shopify create node + ? App Name + > + ``` -### deploy +2. Once your app is created, you can work with it immediately by typing `shopify serve` to start a local development +server, which uses [ngrok](https://ngrok.com) to create a tunnel. ngrok will choose a unique URL for you. The server +will stay open until you type Ctrl-C. -Deploy the current Node project to a hosting service. [Heroku](https://www.heroku.com) is currently the only option, -but more will be added in the future. + ```sh + $ shopify serve + ✓ ngrok tunnel running at https://example.ngrok.io + ✓ writing .env file... + ``` -- `shopify deploy heroku`: Deploy the current Node project to Heroku +3. With the server running, open a new terminal window and type `shopify open` to open your app in your browser and +install it on a development store. -### generate + ```sh + $ shopify open + ``` -Generate code in your app project. Supports generating new pages, new billing API calls, or new webhooks. - -- `shopify generate page` generates a new page in your project. -- `shopify generate billing` generates a new billing API call. -- `shopify generate webhook` generates a new webhook. - -### open - -Open your local development app in the default browser. - -- `shopify open` - -### populate -Populate your Shopify development store with example products, customers, or orders. - -- `shopify populate products` -- `shopify populate customers` -- `shopify populate draftorders` - -### serve -Start a local development node server for your project, as well as a public [ngrok](https://ngrok.com/) tunnel to your -localhost. - -- `shopify serve` - -### tunnel -Start or stop an http tunnel to your local development app using ngrok. - -- `shopify tunnel auth` -- `shopify tunnel start` starts the ngrok tunnel for your app -- `shopify tunnel stop` stops the ngrok tunnel for your app +For more information, look at the [command reference]({% link app/node/commands/index.md %}). diff --git a/docs/app/rails/commands/index.md b/docs/app/rails/commands/index.md new file mode 100644 index 00000000..86e25fcc --- /dev/null +++ b/docs/app/rails/commands/index.md @@ -0,0 +1,48 @@ +--- +title: Rails app project command reference +section: rails +--- + +## create + +- `shopify create rails` creates a new Rails app project in a subdirectory of the current directory. + +## deploy + +Deploy the current Rails project to a hosting service. [Heroku](https://www.heroku.com) is currently the only option, +but more will be added in the future. + +- `shopify deploy heroku` deploys the current Rails project to Heroku. + +## generate + +Generate code in your app project. Supports generating new webhooks. + +- `shopify generate webhook` generates a new webhook. + +## open + +Open your local development app in the default browser. + +- `shopify open` + +## populate +Populate your Shopify development store with example products, customers, or orders. + +- `shopify populate products` +- `shopify populate customers` +- `shopify populate draftorders` + +## serve +Start a local development node server for your project, as well as a public [ngrok](https://ngrok.com/) tunnel to your +localhost. + +- `shopify serve` + +## tunnel +Start or stop an http tunnel to your local development app using ngrok. + +- `shopify tunnel auth` writes an ngrok auth token to `~/.ngrok2/ngrok.yml` to allow connecting with an ngrok account. + [Visit the ngrok site to sign up](https://dashboard.ngrok.com/signup) +- `shopify tunnel start` starts the ngrok tunnel for your app +- `shopify tunnel stop` stops the ngrok tunnel for your app diff --git a/docs/app/rails/index.md b/docs/app/rails/index.md index a3345207..d5ef71ab 100644 --- a/docs/app/rails/index.md +++ b/docs/app/rails/index.md @@ -3,48 +3,32 @@ title: Rails app projects section: rails --- -## Rails app projects +## Getting started -To create a Ruby on Rails project, type `shopify create rails`. +1. To create a new Rails project, type `shopify create rails`. This will scaffold a new Ruby on Rails app in a subdirectory. -Once you have created your project, the following commands are available while working in the project directory. + ```sh + $ shopify create rails + ? App Name + > + ``` -### deploy +2. Once your app is created, you can work with it immediately by typing `shopify serve` to start a local development +server, which uses [ngrok](https://ngrok.com) to create a tunnel. ngrok will choose a unique URL for you. The server +will stay open until you type Ctrl-C. -Deploy the current Rails project to a hosting service. [Heroku](https://www.heroku.com) is currently the only option, -but more will be added in the future. + ```sh + $ shopify serve + ✓ ngrok tunnel running at https://example.ngrok.io + ✓ writing .env file... + ``` -- `shopify deploy heroku`: Deploy the current Rails project to Heroku +3. With the server running, open a new terminal window and type `shopify open` to open your app in your browser and +install it on a development store. -### generate + ```sh + $ shopify open + ``` -Generate code in your app project. Supports generating new webhooks. +For more information, look at the [command reference]({% link app/node/commands/index.md %}). -- `shopify generate webhook` generates a new webhook. - -### open - -Open your local development app in the default browser. - -- `shopify open` - -### populate -Populate your Shopify development store with example products, customers, or orders. - -- `shopify populate products` -- `shopify populate customers` -- `shopify populate draftorders` - -### serve -Start a local development node server for your project, as well as a public [ngrok](https://ngrok.com/) tunnel to your -localhost. - -- `shopify serve` - -### tunnel -Start or stop an http tunnel to your local development app using ngrok. - -- `shopify tunnel auth` writes an ngrok auth token to `~/.ngrok2/ngrok.yml` to allow connecting with an ngrok account. - [Visit the ngrok site to sign up](https://dashboard.ngrok.com/signup) -- `shopify tunnel start` starts the ngrok tunnel for your app -- `shopify tunnel stop` stops the ngrok tunnel for your app diff --git a/docs/core/index.md b/docs/core/index.md index 0516e333..1f97df1c 100644 --- a/docs/core/index.md +++ b/docs/core/index.md @@ -3,31 +3,29 @@ title: Core commands section: core --- -## Core commands +## help -### help - -- `shopify help` lists available commands. The commands available will vary depending on whether you are inside of a project - directory, and what kind of project it is. +- `shopify help` lists available commands. The commands available will vary depending on whether you are inside of a + project directory, and what kind of project it is. - `shopify help [command]` shows detailed help for a specific command. -### connect +## connect - `shopify connect` will re-connect an existing Shopify App CLI project to Shopify systems (e.g. a Partners account or a specific shop). This is useful if you are working on a project in source control and check out the code on another machine. It re-creates a `.env` file with the necessary information. -### create +## create -- `shopify create [project type]` creates a new project of the specified type. The project will be created in a +- `shopify create [project type]` creates a new project of the specified type. The project will be created in a subdirectory of the current directory. If you do not specify a project type, the CLI will prompt you to choose one. Different project types have additional options that can be set or provided through prompts. -### logout +## logout - `shopify logout` will log out of a currently authenticated organization and shop, or clear any invalid credentials. -### update +## update - `shopify update` updates the Shopify App CLI to the latest version. diff --git a/docs/css/docs.css b/docs/css/docs.css index 0d126a44..34a56fe3 100644 --- a/docs/css/docs.css +++ b/docs/css/docs.css @@ -95,6 +95,18 @@ code { margin-left: 30px; } +.in-page-menu li ul a { + border-left: 0; +} + +.link--external { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2020%2020%22%3E%3Cstyle%20type=%22text/css%22%3Ecircle,%20ellipse,%20line,%20path,%20polygon,%20polyline,%20rect,%20text%20%7B%20fill:%20rgb(92,%20106,%20196)%20!important;%20%7D%3C/style%3E%3Cpath%20d=%22M17%202c.553%200%201%20.448%201%201v5c0%20.552-.447%201-1%201s-1-.448-1-1V5.414l-7.293%207.293c-.195.195-.45.293-.707.293s-.512-.098-.707-.293c-.39-.39-.39-1.023%200-1.414L14.586%204H12c-.553%200-1-.448-1-1s.447-1%201-1h5zm-4%209c.553%200%201%20.448%201%201v5c0%20.552-.447%201-1%201H3c-.553%200-1-.448-1-1V7c0-.552.447-1%201-1h5c.553%200%201%20.448%201%201s-.447%201-1%201H4v8h8v-4c0-.552.447-1%201-1z%22/%3E%3C/svg%3E%0A"); + background-position: right center; + background-repeat: no-repeat; + background-size: 16px 16px; + padding-right: 18px; +} + .footer-nav { margin-bottom: 0; border-bottom: 0; diff --git a/docs/getting_started/index.md b/docs/getting_started/index.md index e1df7624..b7307932 100644 --- a/docs/getting_started/index.md +++ b/docs/getting_started/index.md @@ -3,20 +3,18 @@ title: Getting started section: getting_started --- -## Getting started - Developers should have some prior knowledge of the [Shopify app ecosystem](https://shopify.dev/concepts/apps). Currently, Shopify App CLI creates apps using either [Node.js](https://nodejs.org/) or [Ruby on Rails](https://rubyonrails.org/). -### Install +## Install Shopify App CLI installs using a shell script. Download and run it in your terminal with one command: -#### Mac OS and Ubuntu +### Mac OS and Ubuntu ```sh eval "$(curl -sS https://raw.githubusercontent.com/Shopify/shopify-app-cli/master/install.sh)" ``` -#### Windows +### Windows Install [Linux Subsystem for Windows](https://docs.microsoft.com/en-us/windows/wsl/install-win10) and the [Ubuntu VM](https://www.microsoft.com/en-ca/p/ubuntu/9nblggh4msv6), then: ```sh @@ -25,25 +23,25 @@ eval "$(curl -sS https://raw.githubusercontent.com/Shopify/shopify-app-cli/maste > NOTE: Installing the Shopify App CLI requires [curl](https://curl.haxx.se/). You can to see if it's on your system by running: `curl --version` -### Requirements to create a project +## Requirements to create a project - If you don’t have one, [create a Shopify partner account](https://partners.shopify.com/signup). - If you don’t have one, [create a development store](https://help.shopify.com/en/partners/dashboard/development-stores#create-a-development-store) where you can install and test your app. - You should have Node.js version 10.0.0 or higher installed. If you're looking for a way to manage your node versions we recommend [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md) -### Uninstall +## Uninstall There are two steps to completely uninstall Shopify App CLI: 1. Delete the CLI files. 2. Remove the shopify command from your shell profile. -#### Delete the CLI files +### Delete the CLI files With the standard installation process, Shopify App CLI is installed in your home directory. All the files are contained in a hidden directory called `.shopify-app-cli`, which you can delete to uninstall. -#### Remove the `shopify` command from your shell +### Remove the `shopify` command from your shell During the install process, Shopify App CLI adds a line to your shell configuration. This line is typically located in the `.bash_profile` file in your home directory (depending on your system, it may also be found in `.bash_login` or `.profile`). It will look similar to this: