Skip to content

Commit 0b3bf40

Browse files
committed
Merge branch 'develop'
2 parents ee72e2c + 934a2c0 commit 0b3bf40

28 files changed

+1160
-1492
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"presets" : [ "es2015", "react" ]
2+
"presets" : [ "es2015", "react" ],
3+
"plugins" : [ "babel-plugin-transform-decorators-legacy", "babel-plugin-transform-react-constant-elements", "babel-plugin-transform-react-inline-elements" ]
34
}

.eslintrc

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
{
2+
"parser" : "babel-eslint",
3+
"parserOptions" : {
4+
"ecmaVersion" : 6,
5+
"sourceType" : "module",
6+
"ecmaFeatures" : { "jsx" : true }
7+
},
8+
"ecmaFeatures" : { "jsx" : true },
9+
"env" : {
10+
"browser" : true,
11+
"node" : true,
12+
"jest" : true
13+
},
14+
"plugins" : [ "react" ],
15+
"extends" : "eslint:recommended",
16+
"rules" : {
17+
// React
18+
"react/no-deprecated" : "error",
19+
"react/no-did-mount-set-state" : "error",
20+
"react/no-did-update-set-state" : "error",
21+
"react/no-direct-mutation-state" : "error",
22+
"react/no-multi-comp" : "error",
23+
"react/prefer-es6-class" : [ "error", "always" ],
24+
"react/react-in-jsx-scope" : "error",
25+
"react/require-render-return" : "error",
26+
// JSX
27+
"react/jsx-boolean-value" : "warn",
28+
"react/jsx-curly-spacing" : [ "warn", "never" ],
29+
"react/jsx-equals-spacing" : [ "error", "never" ],
30+
"react/jsx-filename-extension" : [ "error", { "extensions" : [ ".js", ".jsx" ] } ],
31+
"react/jsx-first-prop-new-line" : [ "warn", "multiline" ],
32+
"react/jsx-indent" : [ "warn", 4 ],
33+
"react/jsx-indent-props" : [ "warn", 4 ],
34+
"react/jsx-max-props-per-line" : [ "warn", { "maximum" : 1 } ],
35+
"react/jsx-no-duplicate-props" : "error",
36+
"react/jsx-no-undef" : "error",
37+
"react/jsx-pascal-case" : "error",
38+
"react/jsx-space-before-closing" : [ "error", "always" ],
39+
"react/jsx-uses-react" : "error",
40+
"react/jsx-uses-vars" : "error",
41+
"react/jsx-wrap-multilines" : "warn",
42+
// Possible Errors
43+
"no-console" : "off",
44+
// Best Practices
45+
"class-methods-use-this" : "warn",
46+
"complexity" : [ "warn", 32 ],
47+
"consistent-return" : "warn",
48+
"dot-location" : [ "error", "property" ],
49+
"eqeqeq" : "error",
50+
"no-extra-bind" : "error",
51+
"no-extra-label" : "error",
52+
"no-fallthrough" : "off",
53+
"no-floating-decimal" : "error",
54+
"no-invalid-this" : "error",
55+
"no-labels" : "error",
56+
"no-lone-blocks" : "warn",
57+
"no-magic-numbers" : [ "warn", { "ignore" : [ -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 60, 1000 ] } ],
58+
"no-param-reassign" : "warn",
59+
"no-redeclare" : "error",
60+
"no-self-compare" : "error",
61+
"no-undef" : "off",
62+
"no-unused-expressions" : "warn",
63+
"no-unused-vars" : "warn",
64+
// Node.js and CommonJS
65+
"no-sync" : "warn",
66+
// Stylistic Issues
67+
"array-bracket-spacing" : [ "warn", "always" ],
68+
"camelcase" : "warn",
69+
"comma-dangle" : "error",
70+
"comma-spacing" : [
71+
"error", {
72+
"before" : false,
73+
"after" : true
74+
}
75+
],
76+
"comma-style" : [ "error", "last" ],
77+
"consistent-this" : [ "error", "self" ],
78+
"eol-last" : "error",
79+
"indent" : [
80+
"error", 4, {
81+
"SwitchCase" : 1
82+
}
83+
],
84+
"jsx-quotes" : [ "warn", "prefer-double" ],
85+
"key-spacing" : [
86+
"warn", {
87+
"beforeColon" : true,
88+
"afterColon" : true,
89+
"mode" : "minimum",
90+
"align" : "colon"
91+
}
92+
],
93+
"keyword-spacing" : [
94+
"warn", {
95+
"before" : true,
96+
"after" : true
97+
}
98+
],
99+
"max-depth" : [ "warn", 4 ],
100+
"max-nested-callbacks" : [ "warn", 4 ],
101+
"max-params" : [ "warn", 6 ],
102+
"new-cap" : "warn",
103+
"no-multiple-empty-lines" : [
104+
"error", {
105+
"max" : 1,
106+
"maxEOF" : 1,
107+
"maxBOF" : 0
108+
}
109+
],
110+
"no-tabs" : "error",
111+
"no-trailing-spaces" : "error",
112+
"no-whitespace-before-property" : "error",
113+
"one-var-declaration-per-line" : [ "error", "always" ],
114+
"padded-blocks" : [ "error", "never" ],
115+
"quotes" : [ "error", "single" ],
116+
"semi-spacing" : [
117+
"error", {
118+
"before" : false,
119+
"after" : true
120+
}
121+
],
122+
"semi" : [ "error", "always" ],
123+
"space-in-parens" : [ "error", "never" ],
124+
// ECMAScript 6
125+
"arrow-spacing" : [
126+
"error", {
127+
"before" : true,
128+
"after" : true
129+
}
130+
],
131+
"no-class-assign" : "error",
132+
"no-const-assign" : "error",
133+
"no-confusing-arrow" : "error",
134+
"no-dupe-class-members" : "error",
135+
"no-duplicate-imports" : "error",
136+
"no-this-before-super" : "error",
137+
"no-var" : "error",
138+
"prefer-const" : "warn"
139+
}
140+
}

README.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
11
# 9build
22

3-
A tool for building [Cookie for Android](https://github.com//9gag/9gag-chat-android) and [9GAG for Android](https://github.com//9gag/9gag-android) based on [Node.js](https://nodejs.org/) + [Electron](http://electron.atom.io/) + [React](https://facebook.github.io/react/) + [Material UI](http://www.material-ui.com).
3+
A tool for building [Cookie for Android](https://github.com//9gag/9gag-chat-android) and [9GAG for Android](https://github.com//9gag/9gag-android) based on [Node.js](https://nodejs.org/) + [Electron](http://electron.atom.io/) + [React](https://facebook.github.io/react/) + [MobX](https://mobxjs.github.io/mobx/) + [Material UI](http://www.material-ui.com).
44

55
![Screen Shot](https://github.com/alan-tai/9build/raw/master/screenshot.png)
66

77
## Download
88

9-
A pre-built executable for Mac OS X is ready for [download](https://github.com/alan-tai/9build/raw/master/releases/0.1.0/9build.zip).
9+
A pre-built executable for Mac OS X is ready for [download](https://github.com/alan-tai/9build/raw/master/releases/0.2.0/9build.zip).
1010

1111
## Installation
1212

13-
This app requires [Node.js](https://nodejs.org) 4.0 or higher to run.
13+
To install from source, you will need `npm` or `yarn`.
14+
15+
### Install with `npm`
16+
17+
Run this command from the app project directory:
1418
```
1519
npm Install
16-
sudo npm install -g electron
20+
```
21+
22+
### Install with `yarn`
23+
24+
Run this command from the app project directory:
25+
```
26+
yarn
1727
```
1828

1929
### Usage
2030

31+
This app requires [`npm`](https://www.npmjs.com/) to run.
32+
2133
#### From the Command Line
2234

2335
Run this command from the app project directory:
@@ -27,9 +39,20 @@ npm start
2739

2840
#### From the Mac OS X binary
2941

42+
##### macOS
43+
44+
Run this command from the app project directory:
45+
```
46+
npm install -g electron-packager
47+
electron-packager . 9build --platform=darwin --arch=x64 --icon=./res/logo.icns --ignore=.idea --ignore=.gitignore --ignore=yarn.lock --ignore=.DS_Store
48+
```
49+
`9build-darwin-x64/9build.app` will be generated. Double-click to run it.
50+
51+
##### Windows
52+
3053
Run this command from the app project directory:
3154
```
32-
sudo npm install -g electron-packager
33-
electron-packager . 9build --platform=darwin --arch=x64 --icon=./res/logo.icns --prune
55+
npm install -g electron-packager
56+
electron-packager . 9build --platform=win32 --arch=x64 --icon=./res/logo.ico --ignore=.idea --ignore=.gitignore --ignore=yarn.lock --ignore=.DS_Store
3457
```
35-
`9build-darwin-x64/9build.app` will be generated. Double-click to run it.
58+
`9build-win32-x64` folder will be generated. Double-click `9build-win32-x64\9build.exe` to start the app.

app/AppStore.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
'use strict';
2+
3+
import { extendObservable } from 'mobx';
4+
import SimpleDialogStore from './components/dialogs/SimpleDialogStore';
5+
import MessageDialogStore from './components/dialogs/MessageDialogStore';
6+
7+
export default class AppStore {
8+
constructor() {
9+
extendObservable(this, {
10+
aboutDialogStore : new SimpleDialogStore(),
11+
messageDialogStore : new MessageDialogStore(),
12+
loadingIndicatorStatus : 'loading',
13+
isDrawerOpened : false,
14+
isDarkTheme : false,
15+
projectId : 0,
16+
projectPath : [ '', '' ],
17+
variantAppStaging : [ false, false ],
18+
variantAppRelease : [ false, false ],
19+
variantProfDebug : [ false, false ],
20+
buildClean : [ false, false ],
21+
buildFast : [ false, false ],
22+
buildLeak : [ false, false ],
23+
apkUniversal : [ false, false ],
24+
apkArmV7 : [ false, false ],
25+
apkArmV8 : [ false, false ],
26+
apkArm : [ false, false ],
27+
apkX86 : [ false, false ],
28+
apkX8664 : [ false, false ],
29+
deviceId : [ '', '' ],
30+
testUnit : [ false, false ],
31+
testCoverage : [ false, false ],
32+
aarBuild : [ false, false ],
33+
aarClean : [ false, false ],
34+
jarBuild : [ false, false ],
35+
jarClean : [ false, false ],
36+
daoBuild : [ false, false ],
37+
daoClean : [ false, false ]
38+
});
39+
}
40+
}
41+
42+
module.exports = AppStore;

app/about-dialog.jsx

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)