Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-tai committed Oct 26, 2016
2 parents ee72e2c + 934a2c0 commit 0b3bf40
Show file tree
Hide file tree
Showing 28 changed files with 1,160 additions and 1,492 deletions.
3 changes: 2 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"presets" : [ "es2015", "react" ]
"presets" : [ "es2015", "react" ],
"plugins" : [ "babel-plugin-transform-decorators-legacy", "babel-plugin-transform-react-constant-elements", "babel-plugin-transform-react-inline-elements" ]
}
140 changes: 140 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"parser" : "babel-eslint",
"parserOptions" : {
"ecmaVersion" : 6,
"sourceType" : "module",
"ecmaFeatures" : { "jsx" : true }
},
"ecmaFeatures" : { "jsx" : true },
"env" : {
"browser" : true,
"node" : true,
"jest" : true
},
"plugins" : [ "react" ],
"extends" : "eslint:recommended",
"rules" : {
// React
"react/no-deprecated" : "error",
"react/no-did-mount-set-state" : "error",
"react/no-did-update-set-state" : "error",
"react/no-direct-mutation-state" : "error",
"react/no-multi-comp" : "error",
"react/prefer-es6-class" : [ "error", "always" ],
"react/react-in-jsx-scope" : "error",
"react/require-render-return" : "error",
// JSX
"react/jsx-boolean-value" : "warn",
"react/jsx-curly-spacing" : [ "warn", "never" ],
"react/jsx-equals-spacing" : [ "error", "never" ],
"react/jsx-filename-extension" : [ "error", { "extensions" : [ ".js", ".jsx" ] } ],
"react/jsx-first-prop-new-line" : [ "warn", "multiline" ],
"react/jsx-indent" : [ "warn", 4 ],
"react/jsx-indent-props" : [ "warn", 4 ],
"react/jsx-max-props-per-line" : [ "warn", { "maximum" : 1 } ],
"react/jsx-no-duplicate-props" : "error",
"react/jsx-no-undef" : "error",
"react/jsx-pascal-case" : "error",
"react/jsx-space-before-closing" : [ "error", "always" ],
"react/jsx-uses-react" : "error",
"react/jsx-uses-vars" : "error",
"react/jsx-wrap-multilines" : "warn",
// Possible Errors
"no-console" : "off",
// Best Practices
"class-methods-use-this" : "warn",
"complexity" : [ "warn", 32 ],
"consistent-return" : "warn",
"dot-location" : [ "error", "property" ],
"eqeqeq" : "error",
"no-extra-bind" : "error",
"no-extra-label" : "error",
"no-fallthrough" : "off",
"no-floating-decimal" : "error",
"no-invalid-this" : "error",
"no-labels" : "error",
"no-lone-blocks" : "warn",
"no-magic-numbers" : [ "warn", { "ignore" : [ -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 60, 1000 ] } ],
"no-param-reassign" : "warn",
"no-redeclare" : "error",
"no-self-compare" : "error",
"no-undef" : "off",
"no-unused-expressions" : "warn",
"no-unused-vars" : "warn",
// Node.js and CommonJS
"no-sync" : "warn",
// Stylistic Issues
"array-bracket-spacing" : [ "warn", "always" ],
"camelcase" : "warn",
"comma-dangle" : "error",
"comma-spacing" : [
"error", {
"before" : false,
"after" : true
}
],
"comma-style" : [ "error", "last" ],
"consistent-this" : [ "error", "self" ],
"eol-last" : "error",
"indent" : [
"error", 4, {
"SwitchCase" : 1
}
],
"jsx-quotes" : [ "warn", "prefer-double" ],
"key-spacing" : [
"warn", {
"beforeColon" : true,
"afterColon" : true,
"mode" : "minimum",
"align" : "colon"
}
],
"keyword-spacing" : [
"warn", {
"before" : true,
"after" : true
}
],
"max-depth" : [ "warn", 4 ],
"max-nested-callbacks" : [ "warn", 4 ],
"max-params" : [ "warn", 6 ],
"new-cap" : "warn",
"no-multiple-empty-lines" : [
"error", {
"max" : 1,
"maxEOF" : 1,
"maxBOF" : 0
}
],
"no-tabs" : "error",
"no-trailing-spaces" : "error",
"no-whitespace-before-property" : "error",
"one-var-declaration-per-line" : [ "error", "always" ],
"padded-blocks" : [ "error", "never" ],
"quotes" : [ "error", "single" ],
"semi-spacing" : [
"error", {
"before" : false,
"after" : true
}
],
"semi" : [ "error", "always" ],
"space-in-parens" : [ "error", "never" ],
// ECMAScript 6
"arrow-spacing" : [
"error", {
"before" : true,
"after" : true
}
],
"no-class-assign" : "error",
"no-const-assign" : "error",
"no-confusing-arrow" : "error",
"no-dupe-class-members" : "error",
"no-duplicate-imports" : "error",
"no-this-before-super" : "error",
"no-var" : "error",
"prefer-const" : "warn"
}
}
37 changes: 30 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
# 9build

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).
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).

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

## Download

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).
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).

## Installation

This app requires [Node.js](https://nodejs.org) 4.0 or higher to run.
To install from source, you will need `npm` or `yarn`.

### Install with `npm`

Run this command from the app project directory:
```
npm Install
sudo npm install -g electron
```

### Install with `yarn`

Run this command from the app project directory:
```
yarn
```

### Usage

This app requires [`npm`](https://www.npmjs.com/) to run.

#### From the Command Line

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

#### From the Mac OS X binary

##### macOS

Run this command from the app project directory:
```
npm install -g electron-packager
electron-packager . 9build --platform=darwin --arch=x64 --icon=./res/logo.icns --ignore=.idea --ignore=.gitignore --ignore=yarn.lock --ignore=.DS_Store
```
`9build-darwin-x64/9build.app` will be generated. Double-click to run it.

##### Windows

Run this command from the app project directory:
```
sudo npm install -g electron-packager
electron-packager . 9build --platform=darwin --arch=x64 --icon=./res/logo.icns --prune
npm install -g electron-packager
electron-packager . 9build --platform=win32 --arch=x64 --icon=./res/logo.ico --ignore=.idea --ignore=.gitignore --ignore=yarn.lock --ignore=.DS_Store
```
`9build-darwin-x64/9build.app` will be generated. Double-click to run it.
`9build-win32-x64` folder will be generated. Double-click `9build-win32-x64\9build.exe` to start the app.
42 changes: 42 additions & 0 deletions app/AppStore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
'use strict';

import { extendObservable } from 'mobx';
import SimpleDialogStore from './components/dialogs/SimpleDialogStore';
import MessageDialogStore from './components/dialogs/MessageDialogStore';

export default class AppStore {
constructor() {
extendObservable(this, {
aboutDialogStore : new SimpleDialogStore(),
messageDialogStore : new MessageDialogStore(),
loadingIndicatorStatus : 'loading',
isDrawerOpened : false,
isDarkTheme : false,
projectId : 0,
projectPath : [ '', '' ],
variantAppStaging : [ false, false ],
variantAppRelease : [ false, false ],
variantProfDebug : [ false, false ],
buildClean : [ false, false ],
buildFast : [ false, false ],
buildLeak : [ false, false ],
apkUniversal : [ false, false ],
apkArmV7 : [ false, false ],
apkArmV8 : [ false, false ],
apkArm : [ false, false ],
apkX86 : [ false, false ],
apkX8664 : [ false, false ],
deviceId : [ '', '' ],
testUnit : [ false, false ],
testCoverage : [ false, false ],
aarBuild : [ false, false ],
aarClean : [ false, false ],
jarBuild : [ false, false ],
jarClean : [ false, false ],
daoBuild : [ false, false ],
daoClean : [ false, false ]
});
}
}

module.exports = AppStore;
53 changes: 0 additions & 53 deletions app/about-dialog.jsx

This file was deleted.

0 comments on commit 0b3bf40

Please sign in to comment.