Skip to content

Commit

Permalink
[chore] Add design-studio
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard authored and rexxars committed Oct 6, 2020
1 parent c5e348a commit 240303f
Show file tree
Hide file tree
Showing 16 changed files with 172 additions and 4 deletions.
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ function studioTask(name, port) {
['blog-studio', '3336'],
['ecommerce-studio', '3337'],
['clean-studio', '3338'],
['design-studio', '4000'],
['storybook', '9002'],
].forEach(([name, port]) => {
exports[name] = studioTask(name, port)
Expand Down
7 changes: 3 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"concurrency": 8,
"ci": false,
"npmClient": "npm",
"npmClientArgs": [
"--no-package-lock"
],
"npmClientArgs": ["--no-package-lock"],
"packages": [
"packages/@sanity/*",
"packages/blog-studio",
Expand All @@ -19,7 +17,8 @@
"packages/movies-studio",
"packages/sanity",
"packages/storybook",
"packages/test-studio"
"packages/test-studio",
"packages/design-studio"
],
"version": "1.150.8"
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"ecommerce-studio": "gulp ecommerce-studio",
"test-studio": "gulp test-studio",
"clean-studio": "gulp clean-studio",
"design-studio": "gulp design-studio",
"example-studio": "gulp example-studio",
"movies-studio": "gulp movies-studio",
"blog-studio": "gulp blog-studio",
Expand Down
16 changes: 16 additions & 0 deletions packages/design-studio/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Logs
logs
*.log

# Coverage directory used by tools like istanbul
coverage

# Dependency directories
node_modules

# Built assets
dist

# Plugin config
config/@sanity/default-login.json
config/.checksums
21 changes: 21 additions & 0 deletions packages/design-studio/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2016 - 2020 Sanity.io

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions packages/design-studio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# design-studio
3 changes: 3 additions & 0 deletions packages/design-studio/config/@sanity/data-aspects.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"listOptions": {}
}
6 changes: 6 additions & 0 deletions packages/design-studio/config/@sanity/default-layout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"toolSwitcher": {
"order": [],
"hidden": []
}
}
5 changes: 5 additions & 0 deletions packages/design-studio/config/@sanity/form-builder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"images": {
"directUploads": true
}
}
32 changes: 32 additions & 0 deletions packages/design-studio/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"private": true,
"name": "sanity-design-studio",
"version": "1.150.1",
"description": "Sanity Design Studio",
"main": "package.json",
"author": "Sanity.io <hello@sanity.io>",
"license": "MIT",
"scripts": {
"start": "sanity start --port 4000",
"test": "sanity check"
},
"keywords": [
"sanity"
],
"dependencies": {
"@sanity/base": "1.150.3",
"@sanity/components": "1.150.3",
"@sanity/core": "1.150.3",
"@sanity/default-layout": "1.150.3",
"@sanity/default-login": "1.150.1",
"@sanity/desk-tool": "1.150.3",
"@sanity/vision": "1.150.1",
"prop-types": "^15.6.0",
"react": "16.9.0",
"react-dom": "^16.9.0"
},
"devDependencies": {
"typescript": "^3.7.3",
"typescript-plugin-css-modules": "^1.2.1"
}
}
1 change: 1 addition & 0 deletions packages/design-studio/plugins/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
User-specific packages can be placed here
28 changes: 28 additions & 0 deletions packages/design-studio/sanity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"root": true,
"project": {
"name": "Design Studio"
},
"api": {
"projectId": "vr2mh9ho",
"dataset": "production"
},
"plugins": [
"@sanity/base",
"@sanity/components",
"@sanity/default-layout",
"@sanity/default-login",
"@sanity/desk-tool"
],
"env": {
"development": {
"plugins": ["@sanity/vision"]
}
},
"parts": [
{
"name": "part:@sanity/base/schema",
"path": "./schemas"
}
]
}
24 changes: 24 additions & 0 deletions packages/design-studio/schemas/allInputs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const stringExample = {
type: 'string',
name: 'stringExample',
title: 'String example'
}

const textExample = {
type: 'text',
name: 'textExample',
title: 'Text example'
}

const numberExample = {
type: 'number',
name: 'numberExample',
title: 'Number example'
}

export default {
type: 'document',
name: 'allInputs',
title: 'All inputs',
fields: [stringExample, textExample, numberExample]
}
8 changes: 8 additions & 0 deletions packages/design-studio/schemas/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import schemaTypes from 'all:part:@sanity/base/schema-type'
import createSchema from 'part:@sanity/base/schema-creator'
import allInputs from './allInputs'

export default createSchema({
name: 'design-studio',
types: schemaTypes.concat([allInputs])
})
18 changes: 18 additions & 0 deletions packages/design-studio/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "./lib",
"strict": true,
"jsx": "react",
"plugins": [
{
"name": "typescript-plugin-css-modules",
"options": {
"customMatcher": "\\.css$"
}
}
]
},
"include": ["../@sanity/base/src/@types/*.d.ts", "./typings/*.d.ts"],
"files": ["./schemas/index.ts"]
}
4 changes: 4 additions & 0 deletions packages/design-studio/typings/css.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.css' {
const styles: {[key: string]: string}
export default styles
}

0 comments on commit 240303f

Please sign in to comment.