by Anne Gibson
Originally Posted on 31 Jul 2014
https://www.perpendicularangel.com/
Note: The original post was removed from it's original URL, so I just wanted to make sure I saved this somewhere.
----------------------------------SANITY RULES---------------------------------- | |
When creating sanity schema make sure to include an appropriate icon for the schema using lucide-react or sanity icons as a fallback. Make sure it's always a named export, make sure you're always using the Sanity typescript definitions if it's a ts file. Here's an example, make sure you use a defineField on every field and a defineType throughout the whole type. If you don't see any arrayMembers, don't import it: | |
import {defineField, defineType, defineArrayMember} from 'sanity' if it's a .ts file. | |
defineType({ | |
type: 'object', | |
name: 'custom-object', | |
fields: [ | |
defineField({ |
by Anne Gibson
Originally Posted on 31 Jul 2014
https://www.perpendicularangel.com/
Note: The original post was removed from it's original URL, so I just wanted to make sure I saved this somewhere.
// /package/functions/generatePage.ts | |
// `importBuild.cjs` enables us to bundle our serverless functions, see https://vite-plugin-ssr.com/importBuild.cjs | |
// File is generated within /package/dist/server/importBuild.cjs | |
import '../dist/server/importBuild.cjs'; | |
import type { Handler, HandlerEvent } from '@netlify/functions'; | |
import { builder } from '@netlify/functions'; | |
import { fixPathSlashes } from '@unilever/utils-helpers'; |
o-
: Object may be used in any number of unrelated contexts to the one you can currently see it in. Making modifications to these types of class could potentially have knock-on effects in a lot of other unrelated places. Tread carefully.
l-
: Layout is a superset of Object. It follows the same rules, but clearly identifies it's position in the composition.
c-
: Component is a concrete, implementation-specific piece of UI. All of the changes you make to its styles should be detectable in the context you’re currently looking at. Modifying these styles should be safe and have no side effects.
u-
: Utility has a very specific role (often providing only one declaration) and should not be bound onto or changed. It can be reused and is not tied to any specific piece of UI.
<!-- Google CDN --> | |
<link rel="dns-prefetch" href="//ajax.googleapis.com"> | |
<!-- Google API --> | |
<link rel="dns-prefetch" href="//apis.google.com"> | |
<!-- Google Fonts --> | |
<link rel="dns-prefetch" href="//fonts.googleapis.com"> | |
<link rel="dns-prefetch" href="//fonts.gstatic.com"> |
{ | |
"scripts": { | |
"upgrade:interactive": "find . -type f -name 'package.json' -not -path './.git/*' -not -path '*/node_modules/*' -execdir ncu --interactive \\;" | |
}, | |
"devDependencies": { | |
"npm-check-updates": "^10.0.0", | |
} | |
} |