tldraw/package.json
alex b373abf605
add descriptions to examples (#2375)
Adds descriptions to examples.

![Kapture 2023-12-22 at 17 08
32](https://github.com/tldraw/tldraw/assets/1489520/d78657cf-b3c3-4160-b58b-7c08ed27823d)

They show as a list on the index page, and on individual examples they
show in a three-js style sidebar. For now, this is disabled completely
on mobile. Examples can still be opened in 'standalone' mode to get rid
of the sidebar.

Note: the 'view code' link won't work until after these changes are
merged.

There's a small impact on authoring examples: each one needs to live in
a folder with a README.md. At a minimum, the readme needs to look like
this:
```md
---
title: My Example
component: ./MyExample.tsx
---

Here is a 1-liner about my example
```

Optionally, you can:
- Add `hide: true` to the frontmatter to remove the example from the
list (you can skip the description this way)
- Add `order: 3` to control the order in which the example appears.
They're alphabetical otherwise
- Add some more description or links to docs below a `---`. This won't
show in the listing, but will be visible on GitHub and on the example
page itself.

As a follow-up, I'd like to add an 'Open in CodeSandbox' link to each
example. These won't work until we've made a release with these examples
(as our special examples codesandbox is tied to our release process) but
the code is there & ready to go!

Have a play, let me know what you think!

### Change Type

- [x] `documentation` — Changes to the documentation only[^2]

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2023-12-27 17:17:18 +00:00

102 lines
2.8 KiB
JSON

{
"name": "@tldraw/monorepo",
"description": "A tiny little drawing app (monorepo).",
"version": "0.0.0",
"private": true,
"author": {
"name": "tldraw Inc.",
"email": "hello@tldraw.com"
},
"homepage": "https://tldraw.dev",
"repository": {
"type": "git",
"url": "https://github.com/tldraw/tldraw"
},
"bugs": {
"url": "https://github.com/tldraw/tldraw/issues"
},
"keywords": [
"tldraw",
"drawing",
"app",
"development",
"whiteboard",
"canvas",
"infinite"
],
"workspaces": [
"apps/*",
"packages/*",
"apps/vscode/*",
"e2e",
"config",
"scripts"
],
"scripts": {
"clean": "scripts/clean.sh",
"postinstall": "husky install && yarn refresh-assets",
"refresh-assets": "lazy refresh-assets",
"build": "lazy build",
"dev": "LAZYREPO_PRETTY_OUTPUT=0 lazy run dev --filter='{,bublic/}apps/examples' --filter='{,bublic/}packages/tldraw'",
"dev-vscode": "code ./apps/vscode/extension && lazy run dev --filter='{,bublic/}apps/vscode/{extension,editor}'",
"build-types": "lazy inherit",
"build-api": "lazy build-api",
"build-package": "lazy build-package",
"lint": "lazy lint",
"format": "prettier --write --cache \"**/*.{ts,tsx,js,jsx,json}\"",
"typecheck": "yarn refresh-assets && tsx scripts/typecheck.ts",
"check-scripts": "tsx scripts/check-scripts.ts",
"api-check": "lazy api-check",
"test": "lazy test",
"e2e": "lazy e2e --filter='{,bublic/}apps/examples'"
},
"engines": {
"npm": ">=7.0.0"
},
"packageManager": "yarn@3.5.0",
"lint-staged": {
"*.{js,jsx,ts,tsx,json}": [
"prettier --write --cache"
]
},
"devDependencies": {
"@microsoft/api-extractor": "^7.35.4",
"@next/eslint-plugin-next": "^13.3.0",
"@swc/core": "^1.3.55",
"@swc/jest": "^0.2.26",
"@types/glob": "^8.1.0",
"@types/jest": "^28.1.2",
"@types/node": "18.7.3",
"@types/react": "^18.0.24",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"auto": "^10.46.0",
"eslint": "^8.37.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-local": "^1.0.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"fs-extra": "^11.1.0",
"husky": "^8.0.0",
"jest": "^28.1.1",
"json5": "^2.2.3",
"lazyrepo": "0.0.0-alpha.27",
"lint-staged": ">=10",
"prettier": "^2.8.6",
"prettier-plugin-organize-imports": "^3.2.2",
"rimraf": "^4.4.0",
"tsx": "^3.12.7",
"typescript": "^5.0.2",
"vercel": "^28.16.15"
},
"resolutions": {
"@microsoft/api-extractor@^7.35.4": "patch:@microsoft/api-extractor@npm%3A7.35.4#./.yarn/patches/@microsoft-api-extractor-npm-7.35.4-5f4f0357b4.patch"
},
"dependencies": {
"svgo": "^3.0.2"
}
}