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

Commit 0b4b4b6

Browse files
committed
fix untracted files
1 parent 6178786 commit 0b4b4b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+10028
-0
lines changed

.gitignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# node-waf configuration
20+
.lock-wscript
21+
22+
# Compiled binary addons (http://nodejs.org/api/addons.html)
23+
build/Release
24+
25+
# Dependency directory
26+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27+
node_modules
28+
app/node_modules
29+
30+
# OSX
31+
.DS_Store
32+
33+
# App packaged
34+
release
35+
app/main.js
36+
app/main.js.map
37+
app/bundle.js
38+
app/bundle.js.map
39+
app/style.css
40+
app/style.css.map
41+
dist
42+
main.js
43+
main.js.map
44+
45+
.idea
46+
47+
database.sqlite

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.travis.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
sudo: false
2+
3+
language: node_js
4+
5+
node_js:
6+
- 8
7+
- 7
8+
9+
cache:
10+
yarn: true
11+
directories:
12+
- node_modules
13+
- app/node_modules
14+
15+
addons:
16+
apt:
17+
sources:
18+
- ubuntu-toolchain-r-test
19+
packages:
20+
- g++-4.8
21+
- icnsutils
22+
- graphicsmagick
23+
- xz-utils
24+
- xorriso
25+
26+
before_install: yarn global add greenkeeper-lockfile@1
27+
28+
install:
29+
- export CXX="g++-4.8"
30+
- yarn
31+
- cd app && yarn && cd ..
32+
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile
33+
--background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
34+
35+
before_script:
36+
- greenkeeper-lockfile-update
37+
- export DISPLAY=:99.0
38+
- sh -e /etc/init.d/xvfb start &
39+
- sleep 3
40+
41+
script:
42+
- node --version
43+
- yarn package
44+
- yarn test
45+
- yarn test-e2e
46+
47+
after_script: greenkeeper-lockfile-upload
48+
49+
env:
50+
global:
51+
secure: hH+MmHE3WhyyBflZoOZLqqr501OOnvA1VtaqF3WU9rJCpjnKb4fZvHejYtVw65Ho2C40G2a34oBGxnT6INF1BfClYz4IMijL689xuR8dgStQzvcpMTwEQkrLsaCTSqXJR6nzqbRRGmaRfjSLdF6vhd3bGmtVNMEtoEky5EsXeBVjn8D5WMrme17m4F4D/qjHty6Xr5PjZL6eInVKlPZEbALYBhnIWqE5Xw6LcGa8JkqsWw80sLNtz4yWQSwkjrZ1lzCNd/GSUDN5K/BFK6kUZB5HpJZUzUoIQyXmEft+ALZFE4p4tX/H044JguPN9sKsP4SNkz2+3tOMevz/x5of3ssLMqB7gFtd5SGKwjdn6sWYNHKeM0MALyXAARhilyzY0v+xf226ZLRb++8Ih/vAZNymvQjn0idBfwC8ffUSXEx786Zysot1AqWrxaktKFHkBHkiQ4BGkAXVT4FLCgLtdMta+NLYYmuNrmXoU2iEhSzwvZmw94wcBxZie+TvuXE76TgrOiopRPbGXw/0iDm8J1MVWpoPmqSLUG5Vbq9fSNZnR/6j89j7Ws83fdnfZby+qOcV5WMJetQs/EHTxfWJu/AM6bxCYSSmXEJUb8dHpk8el8T+MGLI9pCTiiyy1ozOeo1WKpcOdmF6GU64EOxRWn2837+a9W0kXXAj6tPCW6A=

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"typescript.tsdk": "./node_modules/typescript/lib",
3+
"files.exclude": {
4+
"**/*.js": {"when": "$(basename).ts"},
5+
"**/*.js.map": true,
6+
"**/.git": true,
7+
"**/.svn": true,
8+
"**/.hg": true,
9+
"**/CVS": true,
10+
"**/.DS_Store": true
11+
}
12+
}

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015-present C. T. Lin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Electron + Webpack + React + Typescript + Typeorm
2+
3+
## Step to reproduce
4+
Make sure you already did `yarn install` or `npm install`
5+
1. run `yarn entities` to build `entities/*.ts` to `entities/*.js`.
6+
2. run `yarn dev`

app/actions/counter.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { actionCreatorVoid } from './helpers';
2+
3+
export const increment = actionCreatorVoid('INCREMENT_COUNTER');
4+
export const decrement = actionCreatorVoid('DECREMENT_COUNTER');
5+
6+
export function incrementIfOdd() {
7+
return (dispatch: Function, getState: Function) => {
8+
const { counter } = getState();
9+
10+
if (counter % 2 === 0) {
11+
return;
12+
}
13+
14+
dispatch(increment());
15+
};
16+
}
17+
18+
export function incrementAsync(delay: number = 1000) {
19+
return (dispatch: Function) => {
20+
setTimeout(() => {
21+
dispatch(increment());
22+
}, delay);
23+
};
24+
}

app/actions/helpers.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { Action } from 'redux';
2+
3+
export interface IAction extends Action {}
4+
export interface IActionWithPayload<T> extends IAction {
5+
readonly payload: T;
6+
}
7+
8+
interface IActionCreator<T> {
9+
readonly type: string;
10+
(payload: T): IActionWithPayload<T>;
11+
12+
test(action: IAction): action is IActionWithPayload<T>;
13+
}
14+
15+
interface IActionCreatorVoid {
16+
readonly type: string;
17+
(): IAction;
18+
19+
test(action: IAction): action is IAction;
20+
}
21+
22+
export const actionCreator = <T>(type: string): IActionCreator<T> =>
23+
Object.assign((payload: T): any => ({ type, payload }), {
24+
type,
25+
test(action: IAction): action is IActionWithPayload<T> {
26+
return action.type === type;
27+
}
28+
});
29+
30+
export const actionCreatorVoid = (type: string): IActionCreatorVoid =>
31+
Object.assign((): any => ({ type }), {
32+
type,
33+
test(action: IAction): action is IAction {
34+
return action.type === type;
35+
}
36+
});

app/api/.gitkeep

Whitespace-only changes.

app/app.global.scss

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
@import "~font-awesome/css/font-awesome.css";
2+
3+
body {
4+
position: relative;
5+
color: white;
6+
height: 100vh;
7+
background-color: #232C39;
8+
background-image: linear-gradient(45deg, rgba(0, 216, 255, .5) 10%, rgba(0, 1, 127, .7));
9+
font-family: Arial, Helvetica, Helvetica Neue, serif;
10+
overflow-y: hidden;
11+
}
12+
13+
h2 {
14+
margin: 0;
15+
font-size: 2.25rem;
16+
font-weight: bold;
17+
letter-spacing: -.025em;
18+
color: #fff;
19+
}
20+
21+
p {
22+
font-size: 24px;
23+
}
24+
25+
li {
26+
list-style: none;
27+
}
28+
29+
a {
30+
color: white;
31+
opacity: .75;
32+
text-decoration: none;
33+
}
34+
35+
a:hover {
36+
opacity: 1;
37+
text-decoration: none;
38+
cursor: pointer;
39+
}

0 commit comments

Comments
 (0)