Skip to content

sutter/hello-gatsby

Repository files navigation

Gatsby Hello Starter

Note: This starter uses the Gatsby v2.

⚡️ Features

🚀 Prerequisites

  1. Node version manager

    Install NVM to manage its version of Node:

    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash

    In the project, install and use the current version of Node:

    # Installs the node version specified in the .nvmrc
    nvm install
    # Switches to the node version specified in the .nvmrc
    nvm use

    (Optional but highly recommended) Install AVN to avoid having to run nvm use every time you open the project.

  2. Install Yarn

    Go to https://yvm.js.org/docs/overview

    curl -fsSL https://raw.githubusercontent.com/tophat/yvm/master/scripts/install.sh | bash

🔨 Commands

  1. Download dependencies

    yarn install
  2. Start developing

    Navigate into your new site’s directory and start it up.

    yarn develop

    Your site is now running at http://localhost:8000!

    _Note: You'll also see a second link: http://localhost:8000/___graphql. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial._

  3. Start Storybook

    yarn storybook
  4. Build

    yarn build
  5. Build storybook

    yarn build-storybook
  6. Serve Build

    yarn serve
  7. Create new file

    yarn new
  8. Format files with Prettier

    yarn format