From f3143d2f2b93a1434f7057f183a1a7ab0b86034d Mon Sep 17 00:00:00 2001 From: Zalmoxisus Date: Sun, 20 Dec 2015 15:21:57 +0200 Subject: [PATCH] Initial commit --- .babelrc | 3 +++ .eslintignore | 2 ++ .eslintrc | 20 ++++++++++++++++ .gitignore | 6 +++++ .travis.yml | 3 +++ LICENSE.md | 21 +++++++++++++++++ README.md | 29 +++++++++++++++++++++++ package.json | 55 ++++++++++++++++++++++++++++++++++++++++++++ src/RemoteMonitor.js | 8 +++++++ test/index.spec.js | 0 10 files changed, 147 insertions(+) create mode 100644 .babelrc create mode 100644 .eslintignore create mode 100644 .eslintrc create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 package.json create mode 100644 src/RemoteMonitor.js create mode 100644 test/index.spec.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..65836a6 --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["es2015-loose", "stage-0", "react"] +} diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..81b0eb7 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +lib +**/node_modules diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..47dc057 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,20 @@ +{ + "extends": "eslint-config-airbnb", + "env": { + "browser": true, + "mocha": true, + "node": true + }, + "rules": { + "react/jsx-uses-react": 2, + "react/jsx-uses-vars": 2, + "react/react-in-jsx-scope": 2, + "no-console": 0, + // Temporarily disabled due to babel-eslint issues: + "block-scoped-var": 0, + "padded-blocks": 0, + }, + "plugins": [ + "react" + ] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b7a60ee --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +node_modules +*.log +.DS_Store +lib +coverage +.idea diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c42701f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "iojs" diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..b410d65 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Mihail Diordiev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6c29342 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +A custom monitor for use with [Redux DevTools](https://github.com/gaearon/redux-devtools). + +**In early development stage yet.** + +### Installation + +``` +npm install --save-dev redux-remote-monitor +``` + +### Usage + +You can use `LogMonitor` as the only monitor in your app: + +##### `containers/DevTools.js` + +```js +import React from 'react'; +import { createDevTools } from 'redux-devtools'; +import RemoteMonitor from 'redux-remote-monitor'; + +export default createDevTools( + +); +``` + +### License + +MIT diff --git a/package.json b/package.json new file mode 100644 index 0000000..d76e4be --- /dev/null +++ b/package.json @@ -0,0 +1,55 @@ +{ + "name": "redux-remote-monitor", + "version": "0.0.1", + "description": "A custom monitor for Redux DevTools to relay Redux actions.", + "main": "lib/RemoteMonitor.js", + "files": ["lib"], + "scripts": { + "clean": "rimraf lib", + "build": "babel src --out-dir lib", + "lint": "eslint src test", + "test": "NODE_ENV=test mocha --compilers js:babel-core/register --recursive", + "test:watch": "NODE_ENV=test mocha --compilers js:babel-core/register --recursive --watch", + "prepublish": "npm run lint && npm run test && npm run clean && npm run build" + }, + "repository": { + "type": "git", + "url": "https://github.com/zalmoxisus/redux-remote-monitor.git" + }, + "keywords": [ + "redux", + "devtools", + "flux", + "react", + "hot reloading", + "time travel", + "live edit" + ], + "author": "Mihail Diordiev (https://github.com/zalmoxisus)", + "license": "MIT", + "bugs": { + "url": "https://github.com/zalmoxisus/redux-remote-monitor/issues" + }, + "homepage": "https://github.com/zalmoxisus/redux-remote-monitor", + "devDependencies": { + "babel-cli": "^6.3.15", + "babel-core": "^6.1.20", + "babel-eslint": "^5.0.0-beta4", + "babel-loader": "^6.2.0", + "babel-preset-es2015-loose": "^6.1.3", + "babel-preset-react": "^6.3.13", + "babel-preset-stage-0": "^6.3.13", + "eslint": "^0.23", + "eslint-config-airbnb": "0.0.6", + "eslint-plugin-react": "^3.6.3", + "expect": "^1.6.0", + "mocha": "^2.2.5", + "mocha-jsdom": "^1.0.0", + "rimraf": "^2.3.4", + "webpack": "^1.11.0" + }, + "peerDependencies": { + "react": "^0.14.0", + "redux-devtools": "^3.0.0" + } +} diff --git a/src/RemoteMonitor.js b/src/RemoteMonitor.js new file mode 100644 index 0000000..9a93141 --- /dev/null +++ b/src/RemoteMonitor.js @@ -0,0 +1,8 @@ +import { Component } from 'react'; + +export default class RemoteMonitor extends Component { + static update() { + console.log('props', arguments); + return {}; + } +} diff --git a/test/index.spec.js b/test/index.spec.js new file mode 100644 index 0000000..e69de29