theme.lock file

In order to ensure changes made elsewhere are not overwritten, Themekit needs more information than the dependencies you configure in your config.yml. Themekit needs to store exactly which versions of each asset you currently have on your machine and the versions that you expect to be on shopify.

To do this Themekit uses a theme.lock file in the root of your project (same directory as your config file). These “lockfiles” look like this:

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
assets/announcement-newbuybutton.svg:
  development: 2017-06-21T04:31:21-11:00
  production: 2017-06-21T04:31:21-11:00
assets/app.js.liquid:
  development: 2017-07-18T06:10:40-11:00
  production: 2017-07-18T06:10:40-11:00
assets/arrow-down.svg.liquid:
  development: 2017-02-06T04:00:37-11:00
  production: 2017-02-06T04:00:37-11:00
assets/cart.svg.liquid:
  development: 2017-07-05T04:49:01-11:00
  production: 2017-07-05T04:49:01-11:00
assets/newp.js.liquid:
  development: 2017-07-14T05:55:03-11:00
  production: 2017-07-14T05:55:03-11:00

This is comparable to lockfiles in other package managers like Bundler, Cargo or Yarn. The lock file will keep track of asset versions across all environments that are in the config.yml file. If you download an asset from one environment it will save the versions from all other environments for that asset to lock down the expected version that you will update in the future.

Managed by Themekit

Your theme.lock file is auto-generated and should be handled entirely by Themekit. As you download/upload/replace with the Themekit CLI, it will automatically update your theme.lock file. Do not edit this file directly as it is easy to break something.

Check into source control

All theme.lock files should be checked into source control (e.g. git or mercurial). This allows Themekit to manage all asset versions across all machines, whether it be your coworker’s laptop or a CI server.

Theme publisher should not keep the theme.lock file with your release because it will have no context for other users.