Skip to content

Commit

Permalink
add defaults from vanilla remix
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonGriggs committed Mar 29, 2024
1 parent d788c7c commit ed601ad
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
8 changes: 5 additions & 3 deletions app/components/Records.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ export function Records(props: RecordsProps) {
<a href="/studio">Log in to your Sanity Studio</a> and start creating
content!
</p>
<p>
Or, run{' '}
<p>Or, run </p>
<pre>
<code>
npx sanity@latest exec ./scripts/createData.ts --with-user-token
</code>{' '}
</code>
</pre>
<p>
from the command line to delete existing documents populate the site
with content.{' '}
</p>
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "sanity-remix-template",
"private": true,
"sideEffects": false,
"type": "module",
"scripts": {
Expand All @@ -11,9 +12,9 @@
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@portabletext/react": "^3.0.15",
"@remix-run/node": "^2.8.1",
"@remix-run/react": "^2.8.1",
"@remix-run/serve": "^2.8.1",
"@remix-run/node": "*",
"@remix-run/react": "*",
"@remix-run/serve": "*",
"@resvg/resvg-js": "^2.6.2",
"@sanity/asset-utils": "^1.3.0",
"@sanity/block-tools": "^3.36.0",
Expand Down Expand Up @@ -42,8 +43,8 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@remix-run/dev": "^2.8.1",
"@remix-run/eslint-config": "^2.8.1",
"@remix-run/dev": "*",
"@remix-run/eslint-config": "*",
"@tailwindcss/typography": "^0.5.11",
"@types/jsdom": "^21.1.6",
"@types/react": "^18.2.72",
Expand All @@ -62,6 +63,6 @@
"vite-tsconfig-paths": "^4.3.2"
},
"engines": {
"node": "20.x"
"node": ">=18.0.0"
}
}
7 changes: 3 additions & 4 deletions sanity.cli.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {defineCliConfig} from 'sanity/cli'

import {dataset, projectId} from '~/sanity/projectDetails'

// We can assume this file will only be read in a Node.js environment
export default defineCliConfig({
api: {
projectId,
dataset,
projectId: process.env.VITE_SANITY_PROJECT_ID,
dataset: process.env.VITE_SANITY_DATASET,
},
})
18 changes: 13 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
{
"include": ["env.d.ts", "**/*.ts", "**/*.tsx", "scripts/createData.cjs"],
"include": [
"**/*.ts",
"**/*.tsx",
"**/.server/**/*.ts",
"**/.server/**/*.tsx",
"**/.client/**/*.ts",
"**/.client/**/*.tsx"
],
"compilerOptions": {
"skipLibCheck": true,
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"types": ["@remix-run/node", "vite/client"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"target": "ES2020",
"target": "ES2022",
"strict": true,
"allowJs": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
"~/*": ["./app/*"]
},

// Remix takes care of building everything in `remix build`.
// Vite takes care of building everything, not tsc.
"noEmit": true
}
}

0 comments on commit ed601ad

Please sign in to comment.