Skip to content

Commit

Permalink
feat: sanity setup
Browse files Browse the repository at this point in the history
  • Loading branch information
samderanova committed Nov 10, 2023
1 parent 4d88080 commit 828d0a4
Show file tree
Hide file tree
Showing 10 changed files with 4,749 additions and 239 deletions.
3 changes: 3 additions & 0 deletions apps/sanity/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@sanity/eslint-config-studio"
}
29 changes: 29 additions & 0 deletions apps/sanity/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Dependencies
/node_modules
/.pnp
.pnp.js

# Compiled Sanity Studio
/dist

# Temporary Sanity runtime, generated by the CLI on every dev server start
/.sanity

# Logs
/logs
*.log

# Coverage directory used by testing tools
/coverage

# Misc
.DS_Store
*.pem

# Typescript
*.tsbuildinfo

# Dotenv and similar local-only files
*.local
9 changes: 9 additions & 0 deletions apps/sanity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Sanity Clean Content Studio

Congratulations, you have now installed the Sanity Content Studio, an open source real-time content editing environment connected to the Sanity backend.

Now you can do the following things:

- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
- [Join the community Slack](https://slack.sanity.io/?utm_source=readme)
- [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme)
38 changes: 38 additions & 0 deletions apps/sanity/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "irvinehacks-site-2024",
"private": true,
"version": "1.0.0",
"main": "package.json",
"license": "UNLICENSED",
"scripts": {
"dev": "sanity dev",
"start": "sanity start",
"build": "sanity build",
"deploy": "sanity deploy",
"deploy-graphql": "sanity graphql deploy"
},
"keywords": [
"sanity"
],
"dependencies": {
"@sanity/vision": "^3.19.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"sanity": "^3.19.2",
"styled-components": "^6.0.7"
},
"devDependencies": {
"@sanity/eslint-config-studio": "^3.0.1",
"@types/react": "^18.0.25",
"eslint": "^8.6.0",
"prettier": "^3.0.2",
"typescript": "^5.1.6"
},
"prettier": {
"semi": false,
"printWidth": 100,
"bracketSpacing": false,
"singleQuote": true
}
}
8 changes: 8 additions & 0 deletions apps/sanity/sanity.cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {defineCliConfig} from 'sanity/cli'

export default defineCliConfig({
api: {
projectId: 'fosuyru0',
dataset: 'production'
}
})
18 changes: 18 additions & 0 deletions apps/sanity/sanity.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {defineConfig} from 'sanity'
import {deskTool} from 'sanity/desk'
import {visionTool} from '@sanity/vision'
import {schemaTypes} from './schemas'

export default defineConfig({
name: 'default',
title: 'irvinehacks-site-2024',

projectId: 'fosuyru0',
dataset: 'production',

plugins: [deskTool(), visionTool()],

schema: {
types: schemaTypes,
},
})
1 change: 1 addition & 0 deletions apps/sanity/schemas/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const schemaTypes = []
1 change: 1 addition & 0 deletions apps/sanity/static/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Files placed here will be served by the Sanity server under the `/static`-prefix
20 changes: 20 additions & 0 deletions apps/sanity/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
},
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
Loading

0 comments on commit 828d0a4

Please sign in to comment.