Skip to content

Commit 9b87c66

Browse files
docs(website): add quickstart
1 parent 006650e commit 9b87c66

13 files changed

+119
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { getPackageWithVersion } from '../../templates'
2+
3+
export default (_, view) => [
4+
{
5+
code: `
6+
npm install ${getPackageWithVersion('overmind')} ${getPackageWithVersion(
7+
'overmind-devtools'
8+
)}
9+
`,
10+
},
11+
]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { getPackageWithVersion } from '../../templates'
2+
3+
export default (_, view) => [
4+
{
5+
code: `
6+
npm install concurrently
7+
`,
8+
},
9+
{
10+
fileName: 'package.json',
11+
code: `
12+
{
13+
...
14+
"scripts": {
15+
"start": "concurrently \\"overmind-devtools\\" \\"someBuildTool\\""
16+
},
17+
...
18+
}
19+
`,
20+
},
21+
]
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import { tsSimpleAppIndex } from '../../templates'
2+
3+
export default (ts) =>
4+
ts
5+
? [
6+
{
7+
fileName: 'overmind/state.ts',
8+
code: `
9+
type State = {
10+
title: string
11+
}
12+
13+
export const state: State = {
14+
title: 'My App'
15+
}
16+
`,
17+
},
18+
{
19+
fileName: 'overmind/index.ts',
20+
code: tsSimpleAppIndex(`
21+
import { state } from './state'
22+
23+
export const config = {
24+
state
25+
}
26+
`),
27+
},
28+
{
29+
fileName: 'index.ts',
30+
code: `
31+
import { createOvermind } from 'overmind'
32+
import { config } from './overmind'
33+
34+
const overmind = createOvermind(config)
35+
`,
36+
},
37+
]
38+
: [
39+
{
40+
fileName: 'overmind/state.js',
41+
code: `
42+
export const state = {
43+
title: 'My App'
44+
}
45+
`,
46+
},
47+
{
48+
fileName: 'overmind/index.js',
49+
code: `
50+
import { state } from './state'
51+
52+
export const config = {
53+
state
54+
}
55+
`,
56+
},
57+
{
58+
fileName: 'index.js',
59+
code: `
60+
import { createOvermind } from 'overmind'
61+
import { config } from './overmind'
62+
63+
const overmind = createOvermind(config)
64+
`,
65+
},
66+
]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Quickstart
2+
3+
From the command line install the Overmind package and the devtools:
4+
5+
```marksy
6+
h(Example, { name: "guide/quickstart/install" })
7+
```
8+
9+
It is highly recommended to install the package [concurrently](https://www.npmjs.com/package/concurrently). It allows you to start the devtools as you start your build process:
10+
11+
```marksy
12+
h(Example, { name: "guide/quickstart/install_devtools" })
13+
```
14+
15+
Now set up a simple application like this and you are off to the races!
16+
17+
```marksy
18+
h(Example, { name: "guide/quickstart/simple_app" })
19+
```
20+
21+
When you now fire up your application the devtools should show the state. To get going with your app please follow the next guides.

packages/overmind-website/guides/beginner/01_getstarted.md renamed to packages/overmind-website/guides/beginner/02_getstarted.md

File renamed without changes.

packages/overmind-website/guides/beginner/02_definingstate.md renamed to packages/overmind-website/guides/beginner/03_definingstate.md

File renamed without changes.

packages/overmind-website/guides/beginner/03_writingapplicationlogic.md renamed to packages/overmind-website/guides/beginner/04_writingapplicationlogic.md

File renamed without changes.

packages/overmind-website/guides/beginner/04_runningsideeffects.md renamed to packages/overmind-website/guides/beginner/05_runningsideeffects.md

File renamed without changes.

packages/overmind-website/guides/beginner/05_connectingcomponents.md renamed to packages/overmind-website/guides/beginner/06_connectingcomponents.md

File renamed without changes.

packages/overmind-website/guides/beginner/06_structuringtheapp.md renamed to packages/overmind-website/guides/beginner/07_structuringtheapp.md

File renamed without changes.

0 commit comments

Comments
 (0)