Skip to content

Commit 74dfd9a

Browse files
committed
fix: compiled for sanity 3.0.0-rc.0
Upgraded with "npx @sanity/plugin-kit inject --preset semver-workflow --preset renovatebot"
1 parent 41e79ca commit 74dfd9a

16 files changed

+7020
-1701
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
; editorconfig.org
2+
root = true
3+
charset= utf8
4+
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
indent_style = space
10+
indent_size = 2
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintignore

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
commitlint.config.js
33
lib
44
lint-staged.config.js
5-
node_modules
6-
*.iml
7-
*.yal
8-
*.js
5+
package.config.ts
6+
*.js

.eslintrc

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"node": true,
5+
"browser": true
6+
},
7+
"extends": [
8+
"sanity",
9+
"sanity/typescript",
10+
"sanity/react",
11+
"plugin:react-hooks/recommended",
12+
"plugin:prettier/recommended"
13+
]
14+
}

.gitignore

+47-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,58 @@
11
# Logs
2-
/logs
2+
logs
33
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
413

514
# Coverage directory used by tools like istanbul
6-
/coverage
15+
coverage
16+
17+
# nyc test coverage
18+
.nyc_output
19+
20+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21+
.grunt
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (http://nodejs.org/api/addons.html)
27+
build/Release
728

829
# Dependency directories
9-
/node_modules
30+
node_modules
31+
jspm_packages
1032

11-
# Compiled code
12-
/lib
33+
# Optional npm cache directory
34+
.npm
1335

14-
.idea/
36+
# Optional REPL history
37+
.node_repl_history
1538

39+
# macOS finder cache file
40+
.DS_Store
41+
42+
# VS Code settings
43+
.vscode
44+
45+
# IntelliJ
46+
.idea
1647
*.iml
1748

18-
.parcel-cache
49+
# Cache
50+
.cache
51+
52+
# Yalc
53+
.yalc
54+
yalc.lock
55+
56+
# Compiled plugin
57+
lib
58+

.npmignore

+8-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
/.babelrc
2-
/.depcheckignore.json
3-
/.eslintignore
4-
/.eslintrc
5-
/.idea
6-
/coverage
7-
/jest.config.js
8-
/scripts
91
/test
10-
/tsconfig.json
11-
/tsconfig.lib.json
12-
*.iml
2+
/coverage
3+
.editorconfig
4+
.eslintrc
5+
.gitignore
6+
.github
7+
.prettierrc
8+
.travis.yml
9+
.nyc_output

.npmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
legacy-peer-deps=true
1+
legacy-peer-deps=true

.prettierrc

-6
This file was deleted.

.prettierrc.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
semi: false,
3+
printWidth: 100,
4+
bracketSpacing: false,
5+
singleQuote: true,
6+
}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 - 2022 Sanity.io
3+
Copyright (c) 2022 Sanity.io
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+38-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## Installation
2+
3+
```
4+
npm install --save @sanity/dashboard@studio-v3
5+
```
6+
7+
or
8+
9+
```
10+
yarn add @sanity/dashboard@studio-v3
11+
```
12+
13+
## Usage
14+
115
# Sanity Dashboard
216

317
> **NOTE**
@@ -27,12 +41,12 @@ or
2741
`yarn add @sanity/dashboard@studio-v3`
2842

2943
## Basic usage
30-
In `sanity.config.js` (or .ts), add the dashboard tool to the createConfig plugins array:
44+
In `sanity.config.js` (or .ts), add the dashboard tool to the defineConfig plugins array:
3145

3246
```ts
33-
import { createConfig } from "sanity";
47+
import { defineConfig } from "sanity";
3448
import { dashboardTool } from "@sanity/dashboard";
35-
export default createConfig({
49+
export default defineConfig({
3650
/* ... */
3751
plugins: [
3852
dashboardTool({ widgets: []})
@@ -48,7 +62,7 @@ It should show an empty dashboard, with a message encouraging you to add some wi
4862
Now, add any widgets you might want. The dashboard plugin provides three widgets out-of-the-box:
4963

5064
```ts
51-
import { createConfig } from "sanity";
65+
import { defineConfig } from "sanity";
5266
import {
5367
dashboardTool,
5468
sanityTutorialsWidget,
@@ -188,3 +202,23 @@ Make sure to select the main branch and check "Release new version".
188202

189203
Semantic release will only release on configured branches, so it is safe to run release on any branch.
190204

205+
206+
207+
## License
208+
209+
MIT-licensed. See LICENSE.
210+
211+
## Develop & test
212+
213+
This plugin uses [@sanity/plugin-kit](https://github.com/sanity-io/plugin-kit)
214+
with default configuration for build & watch scripts.
215+
216+
See [Testing a plugin in Sanity Studio](https://github.com/sanity-io/plugin-kit#testing-a-plugin-in-sanity-studio)
217+
on how to run this plugin with hotreload in the studio.
218+
219+
### Release new version
220+
221+
Run ["CI & Release" workflow](https://github.com/sanity-io/dashboard/actions/workflows/main.yml).
222+
Make sure to select the main branch and check "Release new version".
223+
224+
Semantic release will only release on configured branches, so it is safe to run release on any branch.

0 commit comments

Comments
 (0)