Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Commit 152c131

Browse files
authored
Merge pull request #75 from rmevans9/docs
Add some docs for storybook + nyc... and then just keep adding as I work at these things.... lets call this a mixed bag of doc things
2 parents 3deb3ab + cbec6f2 commit 152c131

File tree

4 files changed

+77
-5
lines changed

4 files changed

+77
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is a electron starter kit from some random guy on the Internet.
66

77
# example
88

9-
<img src='./docs/screenshot.png' width='450' />
9+
<img src='./docs/demo.gif' width='450' />
1010

1111
It's not much to look at really. Just a barebones boilerplate. You need to bring your own awesome.
1212

docs/demo.gif

5.05 MB
Loading

docs/stack.md

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,44 @@ Hey, so everyone has their favourites right? Here's a few of mine.
77

88
> **typescript**
99
10+
[typescript - github](https://github.com/Microsoft/TypeScript)
11+
1012
Such a well polished and wonderful typing system. I know this is a stepping stone to a better language, but JavaScript is really comfortable at this point. TypeScript dials the safety part in.
1113

1214

1315
## Language Support
1416

1517
> **tslint**
1618
19+
[tslint - github](https://github.com/palantir/tslint)
20+
1721
A linter with a great set of rules is awesome.
1822

1923
> **husky**, **lint-staged**, **prettier**
2024
25+
[husky - github](https://github.com/typicode/husky) /
26+
[lint-staged - github](https://github.com/okonet/lint-staged) /
27+
[prettier - github](https://github.com/prettier/prettier)
28+
2129
Some automation so I stop checking in crap-looking code.
2230

2331

2432
## Rendering
2533

2634
> **react**, **react-dom**
2735
36+
[react - github](https://github.com/facebook/react)
37+
2838
Can't imagine doing web differently to be honest. I'm sure we will soon, but for mid-2017, this is dominating.
2939

3040
I like `preact` as well. I feel like the switching over will be pretty simple and I probably will.
3141

32-
## Component Styling ##
42+
## Components ##
3343

3444
> **glamor**
3545
46+
[glamor - github](https://github.com/threepointone/glamor)
47+
3648
The winner is:
3749

3850
* ~vanilla css~
@@ -71,14 +83,23 @@ Start your app only when your gut says, "You'll fuck this up long before your st
7183

7284
`glamor` gives me that vibe. 💃
7385

86+
> **Storybook**
87+
88+
[storybook - github](https://github.com/storybooks/storybook)
89+
90+
Provides a sandbox to work on your components with whatever props you can dream of wanting set to make sure your components are in tip top shape before and during use in your application. If you are writing a component you should be writing stories about it.
7491

7592
## Animations
7693

77-
**react-transition-group**
94+
> **react-transition-group**
95+
96+
[react-transition-group - github](https://github.com/reactjs/react-transition-group)
7897

7998
Brings enter + leave lifecycle events for animations.
8099

81-
**popmotion**
100+
> **popmotion**
101+
102+
[popmotion - github](https://github.com/Popmotion/popmotion)
82103

83104
Power animation & tweening library.
84105

@@ -87,6 +108,8 @@ Power animation & tweening library.
87108

88109
> **mousetrap**
89110
111+
[mousetrp - github](https://github.com/ccampbell/mousetrap)
112+
90113
The main menu in electron has keyboard accelators, but we still need one in the renderer for convenience.
91114

92115
Mousetrap fills that gap. It's a pretty decent little library despite not being maintained any more (lol@js). Does the job though. I've tried a couple of others but keep coming back to this one.
@@ -96,13 +119,17 @@ Mousetrap fills that gap. It's a pretty decent little library despite not being
96119

97120
> **ramda**
98121
122+
[ramda - github](https://github.com/ramda/ramda)
123+
99124
There's so much awesome packed in here. `pipe` for days. I'll be honest, it took me a long time get comfortable with `ramda`. Nowadays, you can pry it from my cold dead hands. PRECIOUS!!!
100125

101126

102127
## Electron Things
103128

104129
> **electron-builder**
105130
131+
[electron-builder - github](https://github.com/electron-userland/electron-builder)
132+
106133
This does most of the heavy lifting for assembling cross-platform distributables.
107134

108135
> **electron-updater**
@@ -111,21 +138,30 @@ Allows our app to auto-update.
111138

112139
> **electron-is-dev**, **electron-log**
113140
141+
[electron-is-dev - github](https://github.com/sindresorhus/electron-is-dev) /
142+
[electron-log - github](https://github.com/megahertz/electron-log)
143+
114144
A few quality-of-life utilities for working in Electron.
115145

116146
> **electron-store**
117147
148+
[electron-store - github](https://github.com/sindresorhus/electron-store)
149+
118150
Persist JSON to the file system.
119151

120152
> **electron-window-state-manager**
121153
154+
[electron-window-state-manager - github](https://github.com/TamkeenLMS/electron-window-manager)
155+
122156
Persist window coordinates & dimensions to disk to survive restarts.
123157

124158

125159
## Bundler
126160

127161
> **fuse-box**
128162
163+
[fuse-box - github](https://github.com/fuse-box/fuse-box)
164+
129165
Yes, you read that right. Not WebPack. WebPack always rubbed me wrong. Maybe it's the config? Maybe it's the way they name things? I'm not sure.
130166

131167
What I do know is, once I started playing with FuseBox, I was sold. I like the devs behind this too.
@@ -135,28 +171,45 @@ What I do know is, once I started playing with FuseBox, I was sold. I like the d
135171

136172
> **ava**
137173
174+
[ava - github](https://github.com/avajs/ava)
175+
138176
This is my favourite testing framework. I've tried them all. The devs behind this are very talented, helpful, and friendly.
139177

140178
> **sinon**
141179
180+
[sinon - github](https://github.com/sinonjs/sinon)
181+
142182
This is great for spies and stubs.
143183

144184
> **mockery**
145185
186+
[mockery - github](https://github.com/mockery/mockery)
187+
146188
Hooks require('') calls to hijack dependencies and replace with your own.
147189

190+
> **nyc**
191+
192+
[nyc - github](https://github.com/istanbuljs/nyc)
193+
194+
Coverage report generation of your tests.
195+
148196

149197
## Compile Time Utilities
150198

151199
> **npm-scripts-info**, **npm-run-all**
152200
201+
[npm-scripts-info - github](https://github.com/srph/npm-scripts-info) /
202+
[npm-run-all - github](hhttps://github.com/mysticatea/npm-run-all)
203+
153204
Quality-of-life utilities for npm.
154205

155206

156207
## Docs
157208

158209
> **docsify**
159210
211+
[docsify - github](https://github.com/QingWei-Li/docsify)
212+
160213
You're reading it right now.
161214

162215
* No build-time required.

docs/using.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ I'm still deciding on a simple way, but there will be a script you can run.
1919

2020
```sh
2121
# this does exist yet
22-
npm run time-to-shine
22+
npm run time-to-shine
2323
```
2424

2525

@@ -75,6 +75,25 @@ npm run watch:tests
7575

7676
Now when you edit your files, it'll recompile & re-run the relevant tests on the fly. And it's quick!
7777

78+
If you are ready to see how much of your codebase is covered simply run:
79+
80+
```sh
81+
npm run coverage
82+
```
83+
84+
and check out the output in the coverage folder.
85+
86+
87+
## Writing Components
88+
89+
When you are adding new components to your app you typically will want to write stories in `storybook`. You do this by simply creating a `<component name>.story.tsx` file along side your component and then writing stories that outline the different prop usage and put it in all the states that it could be in. While you are working on the component you will want to run
90+
91+
```sh
92+
npm run storybook
93+
```
94+
95+
and then switch to the storybook view from the `view` menu in your app so you can get a live preview of the component you are working on.
96+
7897

7998

8099
## Building

0 commit comments

Comments
 (0)