Closed hacknug closed 2 weeks ago
Having the same issue. Would be nice to default to the root directory with an optional path pointing to sanity.json
in the extension settings
You can create a symlink. My set up is something like this:
backend/
--sanity.json
frontend/
--sanity.json (symlink)
if you're using ubuntu, mac, or anything like that where you can use the command line, the command is this $ ln -s source target
. So, if I was in the frontend/
directory, which is where I want to create the link to the actual sanity.json
file located in the backedn/
directory, I would execute this command $ ln -s ../backend/sanity.json sanity.json
We have now updated the plugin to support the newer sanity.cli.js|ts config file.
I'm trying to execute some queries from a different directory of my project than the one that holds my
sanity.json
file.Any way to make that available to the extension without moving it to the root directory?
Ideally the extension would look for the nearest file, including sibling directories. Best would be to look in all project dirs except those on
.gitignore
and determine which file is the nearest in case of finding multiple. Not sure how feasable this is though.Adding a way to specify an array of string/regex paths in settings might also work in cases where users have similar structures across projects (would work for me but it's a far for perfect solution imho).