Unverified Commit 21d537c1 authored by Amaury Martiny's avatar Amaury Martiny Committed by GitHub
Browse files

Merge pull request #117 from parity-js/am-lerna

Change lerna commands
parents 7e7ff1f5 bda636ca
......@@ -41,11 +41,11 @@
"scripts": {
"build": "lerna run build",
"preelectron": "yarn build",
"electron": "cd packages/fether-electron && yarn electron",
"lint": "lerna run lint --parallel",
"electron": "lerna run electron --scope fether",
"lint": "semistandard 'packages/**/*.js' --parser babel-eslint",
"prepackage": "yarn build",
"package": "cd packages/fether-electron && yarn package",
"release": "cd packages/fether-electron && yarn release",
"package": "lerna run package --scope fether",
"release": "lerna run release --scope fether",
"start": "npm-run-all -l -p start-*",
"start-electron": "cd packages/fether-electron && yarn start",
"start-hoc": "cd packages/light-hoc && yarn start",
......@@ -55,7 +55,9 @@
"test": "lerna run test --parallel"
},
"devDependencies": {
"babel-eslint": "^8.2.5",
"lerna": "^2.11.0",
"npm-run-all": "^4.1.2"
"npm-run-all": "^4.1.2",
"semistandard": "^12.0.1"
}
}
# fether-electron
Electron wrapper around `fether-react`.
......@@ -31,7 +31,6 @@
"prebuild": "copyfiles -u 2 \"../fether-react/build/**/*\" static/ && ./scripts/fixElectronBug.sh",
"build": "electron-webpack",
"electron": "electron dist/main/main.js",
"lint": "semistandard 'src/**/*.js' --parser babel-eslint",
"prepackage": "./scripts/revertElectronBug.sh",
"package": "electron-builder",
"prerelease": "./scripts/revertElectronBug.sh",
......@@ -49,13 +48,11 @@
"source-map-support": "^0.5.6"
},
"devDependencies": {
"babel-eslint": "^8.2.3",
"copyfiles": "^2.0.0",
"cross-env": "^5.2.0",
"electron": "^2.0.2",
"electron-builder": "^20.15.1",
"electron-webpack": "^2.1.2",
"semistandard": "^12.0.1",
"webpack": "^4.7.0"
}
}
......@@ -26,6 +26,12 @@ const { app, BrowserWindow, ipcMain, session } = electron;
let mainWindow;
const pino = Pino();
// Disable gpu acceleration on linux
// https://github.com/parity-js/fether/issues/85
if (!['darwin', 'win32'].includes(process.platform)) {
app.disableHardwareAcceleration();
}
function createWindow () {
pino.info(`Starting ${productName}...`);
mainWindow = new BrowserWindow({
......
# fether-react
Fether React SPA app.
const { injectBabelPlugin } = require('react-app-rewired');
/* config-overrides.js */
module.exports = function override(config) {
module.exports = function override (config) {
// use the MobX rewire to use @decorators
config = injectBabelPlugin('transform-decorators-legacy', config);
......
......@@ -28,7 +28,6 @@
"build": "npm-run-all build-*",
"build-css": "node-sass-chokidar src/ -o src/",
"build-js": "react-app-rewired build",
"lint": "semistandard 'src/**/*.js' --parser babel-eslint",
"start": "npm-run-all -p start-*",
"start-css": "npm run build-css -- --watch --recursive",
"start-js": "react-app-rewired start",
......@@ -56,12 +55,10 @@
"rxjs": "^6.2.0"
},
"devDependencies": {
"babel-eslint": "^8.2.3",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"node-sass": "^4.9.0",
"node-sass-chokidar": "^1.2.2",
"npm-run-all": "^4.1.2",
"react-app-rewired": "^1.5.2",
"semistandard": "^12.0.1"
"react-app-rewired": "^1.5.2"
}
}
......@@ -19,7 +19,7 @@ import light from 'light-hoc';
* A HOC on light.js to get the current balance.
*
* @example
* @withBalance
* @withBalance()
* class MyComponent extends React.Component{
*
* }
......
# fether-ui
UI components used in Fether.
## TODO
Use Semantic UI (or another UI libray) as a base, instead of recoding everything ourselves.
......@@ -28,7 +28,6 @@
"scripts": {
"prebuild": "rimraf lib",
"build": "babel src --out-dir lib",
"lint": "semistandard 'src/**/*.js' --parser babel-eslint",
"start": "yarn build --watch"
},
"dependencies": {
......@@ -42,11 +41,9 @@
"@babel/preset-env": "^7.0.0-beta.49",
"@babel/preset-react": "^7.0.0-beta.49",
"@babel/preset-stage-0": "^7.0.0-beta.49",
"babel-eslint": "^8.2.3",
"prop-types": "^15.6.1",
"react": "^16.4.0",
"rimraf": "^2.6.2",
"semistandard": "^12.0.1"
"rimraf": "^2.6.2"
},
"peerDependencies": {
"prop-types": "^15.6.1",
......
# light-hoc
A HOC to use @parity/light.js with React. Basically the equivalent of oo7-react for Observables.
A HOC to use [@parity/light.js](https://github.com/parity-js/light.js) with React. Basically the equivalent of oo7-react for Observables.
Probably this should go inside its own repo.
## Usage
The libray provides a higher-order component to use these Observables easily with React apps.
```javascript
import light from '???'; // ??? to be decided
import { syncing$ } from '@parity/light.js';
@light({
syncingVariable: syncing$
})
class MyClass extends React.Component {
render() {
return <div>{JSON.stringify(this.props.syncingVariable)}</div>;
}
}
```
The UI will automatically update when the syncing state changes.
......@@ -28,7 +28,6 @@
"scripts": {
"prebuild": "rimraf lib",
"build": "babel src --out-dir lib",
"lint": "semistandard 'src/**/*.js' --parser babel-eslint",
"start": "yarn build --watch"
},
"peerDependencies": {
......@@ -41,8 +40,6 @@
"@babel/preset-env": "^7.0.0-beta.49",
"@babel/preset-react": "^7.0.0-beta.49",
"@babel/preset-stage-0": "^7.0.0-beta.49",
"babel-eslint": "^8.2.3",
"rimraf": "^2.6.2",
"semistandard": "^12.0.1"
"rimraf": "^2.6.2"
}
}
......@@ -28,7 +28,6 @@
"scripts": {
"prebuild": "rimraf lib",
"build": "babel src --out-dir lib",
"lint": "semistandard 'src/**/*.js' --parser babel-eslint",
"start": "yarn build --watch"
},
"dependencies": {
......@@ -42,8 +41,9 @@
},
"devDependencies": {
"@babel/plugin-transform-runtime": "^7.0.0-beta.51",
"electron": "^2.0.2",
"semistandard": "^12.0.1"
"electron": "^2.0.2"
},
"peerDependencies": {}
"peerDependencies": {
"electron": "^2.0.3"
}
}
......@@ -1657,7 +1657,7 @@ babel-eslint@7.2.3:
babel-types "^6.23.0"
babylon "^6.17.0"
babel-eslint@^8.2.3:
babel-eslint@^8.2.5:
version "8.2.5"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.5.tgz#dc2331c259d36782aa189da510c43dedd5adc7a3"
dependencies:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment