# Existing Projects

The majority of the Sage documentation focuses on setting up new themes. Use this document If you are collaborating on, or taking over an existing theme.

# Gathering information

To work on an existing Sage project you need to know what version of Sage you're working with.

If the root of your theme contains a webpack.mix.js, and the /app directory contains a View directory, then you're likely working with Sage 10.

If the package.json file in the root of your theme has something that looks like this:

{
  "name": "sage",
  "version": "9.0.10",
  ...
}

Then you're working with Sage 9.

If your package.json file doesn't contain the Sage version number, look for a bower.json file. If this file exists, it's safe to assume you're working with Sage 8. Otherwise assume you're likely working with Sage 9.

If none of the above apply, you may be working with a very old version of Sage which doesn't currently have published documentation. Someone on the forums (opens new window) may be able to help you.

# Set up your development environment

Prepare your development environment based on what version of Sage you're working with. For Sage 10:

Set Node.js version with nvm:

$ nvm install --lts

Install Composer dependencies:

$ composer install

Install Node dependencies:

$ yarn

Build your project:

yarn build

For previous versions of Sage, see the docs for Sage 9 or Sage 8.

Page authors:

Ben Word
Ben
Sponsor us on GitHub to help us grow 🌱