March 27, 2023
By Jeff See
Tina's latest release adds support for a new config folder at <root>/tina
.
tina/config.{ts,tsx,js,jsx}
. .tina
configs will continue to work.tinacms codemod move-tina-folder
tinacms build
or tinacms dev
, a tina-lock.json
file will be generated. This should be committed to your repository.tina/__generated__
folder can safely be Git-ignored. A tina/.gitignore
file will be created automatically when you use the codemod.import { client } from '../tina/__generated__/client'
Previously, this was at <root>/.tina
but this was problematic for a few reasons. Folders that start with a dot are usually hidden automatically by file managers, and some build tools like eslint
ignore them out of the box.
There was also often confusion around what files get committed to Git, and which should be ignored. Previously, the .tina/__generated__
folder had 3 files in it that needed to be committed to your Git repo: _schema.json
, _lookup.json
, and _graphql.json
. These files, and the entire tina/__generated__
folder can now be safely ignored. Instead, when you run tinacms dev
or tinacms build
you'll see a generated tina/tina-lock.json
file. This file should be committed to git.
Previous config:
- .tina- __generated__- _graphql.json // needed to be in Git- _lookup.json // needed to be in Git- _schema.json // needed to be in Git- ... // other files which could be Git-ignored- config.ts- queries- frags.gql // custom frags- queries.gql // custom queries
Updated config
- tina- .gitignore- __generated__ // gitignored- config.ts- tina-lock.json // replaces _schema, _lookup, _graphql- queries- frags.gql // custom frags- queries.gql // custom queries
Last Edited: March 27, 2023
Resources
© TinaCMS 2019–2023