Skip to content

Commit

Permalink
Add sanity.json back; add workaround for .env bug
Browse files Browse the repository at this point in the history
  • Loading branch information
msfragala committed Oct 10, 2023
1 parent 55d4c46 commit 4b51877
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.env
.env.*
.sanity
.sanity.json

# Logs
logs
Expand Down
5 changes: 3 additions & 2 deletions sanity.cli.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {defineCliConfig} from 'sanity/cli'
import vars from './sanity.json'

export default defineCliConfig({
api: {
projectId: process.env.SANITY_STUDIO_PROJECT_ID,
dataset: process.env.SANITY_STUDIO_DATASET,
projectId: vars.projectId,
dataset: vars.dataset,
},
})
7 changes: 4 additions & 3 deletions sanity.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import {defineConfig, defineType} from 'sanity'
import {deskTool} from 'sanity/desk'
import {youtubeInput} from './src'
import vars from './.sanity.json'

export default defineConfig({
name: 'default',
title: 'sanity-plugin-youtube-input',
projectId: process.env.SANITY_STUDIO_PROJECT_ID,
dataset: process.env.SANITY_STUDIO_DATASET,
projectId: vars.projectId,
dataset: vars.dataset,
plugins: [
deskTool(),
youtubeInput({
apiKey: process.env.SANITY_STUDIO_GOOGLE_API_KEY,
apiKey: vars.googleApiKey,
}),
],
schema: {
Expand Down
8 changes: 8 additions & 0 deletions sanity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parts": [
{
"implements": "part:@sanity/base/sanity-root",
"path": "./v2-incompatible.js"
}
]
}

0 comments on commit 4b51877

Please sign in to comment.