Skip to content

Commit

Permalink
chore: 🤖 cleanup schemas and env
Browse files Browse the repository at this point in the history
  • Loading branch information
BolajiAyodeji committed Feb 12, 2023
1 parent f9087e5 commit 606f7ad
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 28 deletions.
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# For Sanity Studio Locally
SANITY_STUDIO_API_PROJECT_ID="your_project_id"
SANITY_STUDIO_API_DATASET="your_dataset"

# ----- Sanity ------
SANITY_PROJECT_ID="your_project_id"
SANITY_DATASET=production
Expand Down
3 changes: 1 addition & 2 deletions .sanity-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ This folder contains the required metadata for using this repository as a templa
You can do the following things:

- [Read the installation guide](https://github.com/commercelayer/sanity-template-commercelayer#installation-guide).
- [Read the tutorial article about this starter](#).
- [Read the tutorial article about this starter](https://commercelayer.io/blog/how-to-build-an-international-ecommerce-website-with-sanity-and-commerce-layer).
- [Check out other projects and resources like this starter](https://commercelayer.io/developers).
- [Read our comprehensive Headless Commerce guide](https://commercelayer.io/guides/headless-commerce).
- Join [Commerce Layer's Slack community](https://slack.commercelayer.app).
2 changes: 1 addition & 1 deletion .sanity-template/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2.0,
"version": 3.0,
"title": "Commerce Layer Starter",
"description": "A multi-country ecommerce starter built with Sanity Studio, Commerce Layer, Next.js, and deployed to Netlify.",
"previewMedia": {
Expand Down
3 changes: 3 additions & 0 deletions studio/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SANITY_STUDIO_TITLE="your preferred studio title"
SANITY_STUDIO_PROJECT_ID="your_project_id"
SANITY_STUDIO_DATASET=production
6 changes: 3 additions & 3 deletions studio/sanity.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import schemas from "./schemas/schemaTypes";
import { Logo } from "./plugins/studio-logo/logo";

export default defineConfig({
title: "<#< sanity.projectTitle >#>",
projectId: "wvv7gbzb",
dataset: "production",
title: import.meta.env.SANITY_STUDIO_PROJECT_TITLE,
projectId: import.meta.env.SANITY_STUDIO_PROJECT_ID,
dataset: import.meta.env.SANITY_STUDIO_DATASET,
plugins: [deskTool(), visionTool()],
schema: {
types: schemas,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SlGlobeAlt } from "react-icons/sl";
import { defineField, defineType } from "sanity";
import supportedLanguages from "./locale/supportedLanguages";
import supportedLanguages from "../locale/supportedLanguages";

const baseLanguage =
supportedLanguages.find((l) => l.isDefault) || supportedLanguages[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TfiFlagAlt2 } from "react-icons/tfi";
import { defineField, defineType } from "sanity";
import supportedLanguages from "./locale/supportedLanguages";
import supportedLanguages from "../locale/supportedLanguages";

const baseLanguage =
supportedLanguages.find((l) => l.isDefault) || supportedLanguages[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TfiShoppingCartFull } from "react-icons/tfi";
import { defineField, defineType } from "sanity";
import supportedLanguages from "./locale/supportedLanguages";
import supportedLanguages from "../locale/supportedLanguages";

const baseLanguage =
supportedLanguages.find((l) => l.isDefault) || supportedLanguages[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ImImages } from "react-icons/im";
import { defineField, defineType } from "sanity";
import supportedLanguages from "./locale/supportedLanguages";
import supportedLanguages from "../locale/supportedLanguages";

const baseLanguage =
supportedLanguages.find((l) => l.isDefault) || supportedLanguages[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GiWeight } from "react-icons/gi";
import { defineField, defineType } from "sanity";
import supportedLanguages from "./locale/supportedLanguages";
import supportedLanguages from "../locale/supportedLanguages";

const baseLanguage =
supportedLanguages.find((l) => l.isDefault) || supportedLanguages[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BiCheckboxSquare } from "react-icons/bi";
import { defineField, defineType } from "sanity";
import supportedLanguages from "./locale/supportedLanguages";
import supportedLanguages from "../locale/supportedLanguages";

const baseLanguage =
supportedLanguages.find((l) => l.isDefault) || supportedLanguages[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ImUngroup } from "react-icons/im";
import { defineField, defineType } from "sanity";
import supportedLanguages from "./locale/supportedLanguages";
import supportedLanguages from "../locale/supportedLanguages";

const baseLanguage =
supportedLanguages.find((l) => l.isDefault) || supportedLanguages[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { VscTypeHierarchySub } from "react-icons/vsc";
import { defineField, defineType } from "sanity";
import supportedLanguages from "./locale/supportedLanguages";
import supportedLanguages from "../locale/supportedLanguages";

const baseLanguage =
supportedLanguages.find((l) => l.isDefault) || supportedLanguages[0];
Expand Down
20 changes: 10 additions & 10 deletions studio/schemas/schemaTypes.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import country from "./country";
import catalog from "./catalog";
import size from "./size";
import taxon from "./taxon";
import taxonomy from "./taxonomy";
import variant from "./variant";
import productImage from "./productImage";
import product from "./product";
import blockContent from "./documents/blockContent";
import country from "./documents/country";
import catalog from "./documents/catalog";
import size from "./documents/size";
import taxon from "./documents/taxon";
import taxonomy from "./documents/taxonomy";
import variant from "./documents/variant";
import productImage from "./documents/productImage";
import product from "./documents/product";

import blockContent from "./blockContent";
import localeString from "./locale/String";
import localeText from "./locale/Text";
import localeSlug from "./locale/Slug";
import localeBlockContent from "./locale/BlockContent";

export default [
blockContent,
country,
catalog,
size,
Expand All @@ -22,7 +23,6 @@ export default [
variant,
productImage,
product,
blockContent,
localeString,
localeText,
localeSlug,
Expand Down

0 comments on commit 606f7ad

Please sign in to comment.