Skip to content

Commit

Permalink
chore: setup parcel
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Aug 12, 2022
1 parent 8b00952 commit 85b8808
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 22 deletions.
40 changes: 28 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,26 @@
"default": "./dist/next-sanity.esm.js"
},
"./package.json": "./package.json",
"./preview": {
"source": "./src/preview/index.ts",
"require": "./lib/cjs/preview/index.js",
"default": "./lib/esm/preview/index.js"
},
"./studio": {
"source": "./src/studio.ts",
"require": "./lib/cjs/studio.js",
"default": "./lib/esm/studio.js"
"source": "./src/studio/index.ts",
"require": "./lib/cjs/studio/index.js",
"default": "./lib/esm/studio/index.js"
}
},
"main": "dist/index.js",
"module": "dist/next-sanity.esm.js",
"typesVersions": {
"*": {
"preview": [
"./lib/dts/preview/index.d.ts"
],
"studio": [
"./lib/dts/studio.d.ts"
"./lib/dts/studio/index.d.ts"
]
}
},
Expand Down Expand Up @@ -73,6 +81,7 @@
"dependencies": {
"@sanity/client": "^3.3.3",
"@sanity/groq-store": "^0.4.0",
"@swc/helpers": "^0.4.6",
"eventsource": "^2.0.2",
"groq": "^2.29.3",
"use-sync-external-store": "^1.2.0"
Expand Down
5 changes: 3 additions & 2 deletions src/preview/useAuthenticated.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {useEffect, useReducer, useRef} from 'react'
import {getAborter} from 'src/aborter'
import {getCurrentUser} from 'src/currentUser'

import {getAborter} from '../aborter'
import {getCurrentUser} from '../currentUser'

export type AuthMode = 'dual' | 'token' | 'cookie'

Expand Down
5 changes: 3 additions & 2 deletions src/preview/useGroqStore.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {groqStore} from '@sanity/groq-store'
import {useMemo, useState} from 'react'
import type {GroqStoreEventSource} from 'src/types'
import {useParams} from 'src/useSubscription'

import type {GroqStoreEventSource} from '../types'
import {useParams} from '../useSubscription'

const EMPTY_PARAMS = {}

Expand Down
1 change: 0 additions & 1 deletion src/studio.ts

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"emitDeclarationOnly": true,
"declarationDir": "lib/dts"
},
"include": ["src/*.ts", "src/*.tsx"],
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules"]
}

0 comments on commit 85b8808

Please sign in to comment.