Solved

App Development - Source Control for Multiple Developers

ddiehlpdx
Shopify Partner
4 1 0

I'm trying to setup a workable development environment for building a shopify app with a team of developers, and I'm not really finding any helpful documentation on how to do so.

 

Our app was created using Shopify CLI. We currently have 3 developers, each with our own partner account and store. Initially we thought we had a working setup by adding *.toml to .gitignore and relying on each developer's local toml files, but we hit a snag today when one developer added an extension, and the shopify.extension.toml file was of course ignored meaning when the rest of us pulled updates we were missing this critical file. Additionally, we are realizing now we also need to add *.js.map to .gitignore since those files also contain environment specific content.

 

Anyone else working on a team? How are you managing source control for your app and extensions? I'm surprised at how difficult it's been to find any guidance on this.

Accepted Solution (1)

ddiehlpdx
Shopify Partner
4 1 0

This is an accepted solution.

Circling back on this in case anyone else has the same question; we figured it out ourselves.

 

Adding the following to our .gitignore set us up for working as a team:

shopify.app.toml

extensions/*/dist

 

The shopify.app.toml file is created automatically upon running npm run dev and is specific to each developer environment. The extensions/*/dist is where the compiled JS files are placed for the extensions. You do need the shopify.extension.toml files in source control but the dist folder is generated on npm run dev and includes a map file which is specific to the local machine.

View solution in original post

Reply 1 (1)

ddiehlpdx
Shopify Partner
4 1 0

This is an accepted solution.

Circling back on this in case anyone else has the same question; we figured it out ourselves.

 

Adding the following to our .gitignore set us up for working as a team:

shopify.app.toml

extensions/*/dist

 

The shopify.app.toml file is created automatically upon running npm run dev and is specific to each developer environment. The extensions/*/dist is where the compiled JS files are placed for the extensions. You do need the shopify.extension.toml files in source control but the dist folder is generated on npm run dev and includes a map file which is specific to the local machine.