Skip to content

Commit

Permalink
docs: add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
acrazing committed Nov 1, 2024
1 parent 229c16f commit 2efdd6d
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 15 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions examples/Counter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"amos": "^0.3.0-beta.28",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand Down
5 changes: 4 additions & 1 deletion examples/Counter/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"lib": ["ES2022", "DOM"],
"lib": [
"ES2022",
"DOM"
],
"declaration": false,
"emitDeclarationOnly": false
}
Expand Down
1 change: 1 addition & 0 deletions examples/TodoMVC/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"amos": "^0.3.0-beta.28",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@amos/root",
"private": true,
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"license": "MIT",
"workspaces": [
"packages/*",
Expand Down
2 changes: 1 addition & 1 deletion packages/amos-babel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-babel",
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"private": true,
"files": [],
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/amos-boxes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-boxes",
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-core",
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos-io/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-io",
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos-persist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-persist",
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-react",
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"private": true,
"files": [],
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/amos-shapes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-shapes",
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos-testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-testing",
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-typescript",
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"private": true,
"files": [],
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/amos-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-utils",
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos",
"version": "0.3.0-beta.27",
"version": "0.3.0-beta.28",
"description": "An out-of-the-box state management library designed for your large-scale projects.",
"keywords": [
"amos",
Expand Down
2 changes: 1 addition & 1 deletion website/docs/01-Introduction/01-get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ Next, you can go to the [Concepts](./03-concepts.md) page to learn about the cor
explore topics of interest in the menu on the left 👈 of this document.

We recommend starting with our
article, [How to design state in large-scale applications](./04-how-to.md), to understand the
article, [How to design state in large-scale applications](./05-how-to.md), to understand the
reasoning behind Amos's design and to help you make the most of it.
3 changes: 3 additions & 0 deletions website/docs/01-Introduction/04-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Examples

## TodoMVC
File renamed without changes.
2 changes: 2 additions & 0 deletions website/src/theme/ReactLiveScope/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {App} from '../../../../examples/TodoMVC/src/App';
import React from 'react';
import * as Amos from 'amos';
import * as AmosReact from 'amos/react';
Expand All @@ -14,6 +15,7 @@ const ReactLiveScope = {
React,
...Amos,
...AmosReact,
TodoMVC: App,
require,
};

Expand Down
4 changes: 3 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5227,6 +5227,7 @@ __metadata:
"@types/react": "npm:^18.3.10"
"@types/react-dom": "npm:^18.3.0"
"@vitejs/plugin-react": "npm:^4.3.2"
amos: "npm:^0.3.0-beta.28"
globals: "npm:^15.9.0"
react: "npm:^18.3.1"
react-dom: "npm:^18.3.1"
Expand All @@ -5242,6 +5243,7 @@ __metadata:
"@types/react": "npm:^18.3.10"
"@types/react-dom": "npm:^18.3.0"
"@vitejs/plugin-react": "npm:^4.3.2"
amos: "npm:^0.3.0-beta.28"
globals: "npm:^15.9.0"
react: "npm:^18.3.1"
react-dom: "npm:^18.3.1"
Expand Down Expand Up @@ -5315,7 +5317,7 @@ __metadata:
languageName: unknown
linkType: soft

"amos@workspace:packages/amos":
"amos@npm:^0.3.0-beta.28, amos@workspace:packages/amos":
version: 0.0.0-use.local
resolution: "amos@workspace:packages/amos"
dependencies:
Expand Down

0 comments on commit 2efdd6d

Please sign in to comment.