Skip to content

Commit

Permalink
Merge pull request #71 from plouc/v1.1.x
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
Raphaël Benitte committed Apr 4, 2016
2 parents cefdd4b + 041b9c6 commit dd57c8f
Show file tree
Hide file tree
Showing 38 changed files with 760 additions and 471 deletions.
6 changes: 6 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
"es2015",
"react"
]
}
61 changes: 52 additions & 9 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,63 @@
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"blockBindings": true,
"jsx": true
},
},
"env": {
"browser": true,
"node": true
"es6": true
},
"plugins": [
"react"
],
"rules": {
"strict": 0,
"quotes": "single",
"indent": 4,
"no-multi-spaces": false,
"no-underscore-dangle": false,
"eol-last": [0],
"semi": 2,
"prefer-template": 2,
"indent": [2, 4, {
"SwitchCase": 1
}],
"dot-notation": [2, {
"allowKeywords": true
}],
"key-spacing": [2, {
"align": "value",
"beforeColon": false,
"afterColon": true
}]
}],
"quotes": [2, "single"],
"jsx-quotes": [2, "prefer-double"],
"array-bracket-spacing": [2, "never"],
"eol-last": 2,
"comma-style": [2, "last"],
"space-before-function-paren": [2, {
"anonymous": "always",
"named": "never"
}],
"react/jsx-key": 2,
"react/jsx-pascal-case": 2,
"react/jsx-indent": [2, 4],
"react/jsx-closing-bracket-location": 2,
"react/jsx-curly-spacing": [2, "never"],
"react/jsx-no-duplicate-props": [2, {
"ignoreCase": true
}],
"react/jsx-no-bind": [1, {
"ignoreRefs": false,
"allowArrowFunctions": false,
"allowBind": false
}],
"react/no-direct-mutation-state": 2,
"react/no-deprecated": [2, {
"react": "0.13.3"
}],
"react/prop-types": [1, {}],
"react/react-in-jsx-scope": 2,
"react/prefer-es6-class": [2, "always"],
"react/display-name": 2
}
}
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ logs
node_modules
.idea
lib
npm-debug.log
npm-debug.log*

# Ignore non default themes
src/themes/*
Expand Down
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ language: node_js
node_js:
- '0.12'
- '4'
- '5'
script:
- npm run eslint
- npm test
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
> - [Internal]
> - [Polish]

## v1.1.0 (2016-04-04)

* **Internal**
* `packages`: [#71](https://github.com/plouc/mozaik-ext-travis/pull/71) Update babel and other packages.


## v1.0.13 (2016-04-02)

* **New Feature**
Expand All @@ -17,16 +24,19 @@
* `build`: [#69](https://github.com/plouc/mozaik/pull/69) Update watchify to prevent segment fault errors.
* `websockets`: [#68](https://github.com/plouc/mozaik/pull/68) Fixing unexpected end of input console error.


## v1.0.12 (2016-03-23)

* **Bug Fix**
* `styles`: [#65](https://github.com/plouc/mozaik/pull/65) Added `overflow: hidden` to avoid V & H scrollbars.


## v1.0.11 (2016-03-18)

* **Bug Fix**
* `build`: [e0e8a7e](https://github.com/plouc/mozaik/commit/e0e8a7e7adf3824c4fff9783153803947568945e) Fix copy issue when using npm@3.


## v1.0.10 (2016-01-14)

* **Bug Fix**
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
![MOZAÏK][logo]

[![License][license-image]][license-url]
[![Travis CI][travis-image]][travis-url]
[![NPM version][npm-image]][npm-url]
[![Quality][codeclimate-image]][codeclimate-url]
[![Dependencies][gemnasium-image]][gemnasium-url]
[![Widgets][widget-count-image]][widget-count-url]

Mozaïk is a tool based on nodejs / react / reflux / d3 / stylus to easily craft beautiful dashboards. [See demo](http://mozaik.herokuapp.com/)

Expand Down Expand Up @@ -122,6 +122,8 @@ Mozaïk dashboard comes with 5 themes and makes it easy to [develop your own the
theme: 'night-blue'
```
[license-image]: https://img.shields.io/github/license/plouc/mozaik.svg?style=flat-square
[license-url]: https://github.com/plouc/mozaik/blob/master/LICENSE.md
[logo]: https://raw.githubusercontent.com/wiki/plouc/mozaik/assets/mozaik-logo-v2.png
[widget-count-image]: https://img.shields.io/badge/widgets-x21-green.svg?style=flat-square
[npm-image]: https://img.shields.io/npm/v/mozaik.svg?style=flat-square
Expand Down
1 change: 1 addition & 0 deletions gulp/tasks/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function getBundler(isDev) {
});

bundler.transform(babelify, {
presets: ['es2015', 'react']
});

return bundler;
Expand Down
3 changes: 2 additions & 1 deletion mocha.opts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
--compilers js:babel/register
--compilers js:babel-register
--recursive
34 changes: 20 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mozaik",
"version": "1.0.13",
"version": "1.1.0",
"description": "Mozaik dashboard composition tool",
"repository": {
"type": "git",
Expand All @@ -26,15 +26,16 @@
"widget",
"extension",
"dashboard",
"framework",
"dataviz",
"d3",
"react"
],
"dependencies": {
"babelify": "^6.1.3",
"bluebird": "^2.4.2",
"bluebird": "3.3.4",
"browserify": "^8.0.2",
"chalk": "^1.1.0",
"classnames": "2.2.3",
"d3": "^3.5.2",
"del": "^1.1.1",
"dotenv": "^0.5.1",
Expand All @@ -48,13 +49,13 @@
"gulp-stylus": "^2.0.0",
"gulp-uglify": "^1.0.2",
"gulp-util": "^3.0.3",
"jquery": "^2.1.3",
"lodash": "^3.2.0",
"memory-cache": "0.0.5",
"reflux": "^0.2.5",
"react-mixin": "3.0.4",
"reflux": "0.4.0",
"request": "^2.51.0",
"superagent": "^0.21.0",
"superagent-bluebird-promise": "^0.6.0",
"superagent": "1.8.3",
"superagent-bluebird-promise": "3.0.0",
"swig": "^1.4.2",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.0.0",
Expand All @@ -63,13 +64,18 @@
"ws": "1.0.1"
},
"devDependencies": {
"babel": "^4.3.0",
"babel-eslint": "^1.0.6",
"eslint": "^0.15.1",
"babel-eslint": "5.0.0",
"babel-preset-es2015": "6.6.0",
"babel-preset-react": "6.5.0",
"babel-register": "6.7.2",
"babelify": "7.2.0",
"enzyme": "2.1.0",
"eslint": "2.2.0",
"eslint-plugin-react": "4.2.3",
"expect": "1.15.2",
"mocha": "^2.1.0",
"mockery": "^1.4.0",
"rewire": "^2.3.1",
"should": "^5.0.1",
"react": "^0.13.3",
"sinon": "^1.12.2"
},
"peerDependencies": {
Expand All @@ -81,7 +87,7 @@
]
},
"scripts": {
"eslint": "eslint ./src/*",
"test": "mocha --opts mocha.opts ./tests/**/*.test.js"
"eslint": "eslint --ext .js --ext .jsx ./src/*",
"test": "mocha --opts mocha.opts"
}
}
6 changes: 3 additions & 3 deletions src/Bus.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ class Bus {
this._mozaik.logger.info(`Setting timer for "${ requestId }"`);
this.subscriptions[requestId].timer = setInterval(() => {
this.processApiCall(requestId, callFn, request.params);
}, 10000);
}, 100000);
}

// avoid adding a client for the same API call twice
if (!_.contains(this.subscriptions[requestId].clients, clientId)) {
if (!_.includes(this.subscriptions[requestId].clients, clientId)) {
this.subscriptions[requestId].clients.push(clientId);

// if there's an available cached response, send it immediately
Expand All @@ -124,7 +124,7 @@ class Bus {
*
* @param id
*/
removeClient(id) {
removeClient(id) {
_.forOwn(this.subscriptions, (subscription, subscriptionId) => {
subscription.clients = _.without(subscription.clients, id);

Expand Down
7 changes: 5 additions & 2 deletions src/Mozaik.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import path from 'path';
import chalk from 'chalk';
import Bus from './Bus';
import express from 'express';
import server from './server';


class Mozaik {
constructor(config) {
Expand Down Expand Up @@ -31,7 +33,7 @@ class Mozaik {
startServer(app) {
app = app || express();

require('./server')(this, app);
server(this, app);
}

/**
Expand All @@ -50,4 +52,5 @@ class Mozaik {
}
}

export default Mozaik;

export default Mozaik;
4 changes: 3 additions & 1 deletion src/browser/actions/ApiActions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Reflux from 'reflux';


const ApiActions = Reflux.createActions([
'get'
]);

export { ApiActions as default };

export default ApiActions;
4 changes: 3 additions & 1 deletion src/browser/actions/ConfigActions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Reflux from 'reflux';


const ConfigActions = Reflux.createActions([
'loadConfig'
]);

export { ConfigActions as default };

export default ConfigActions;
4 changes: 3 additions & 1 deletion src/browser/actions/DashboardActions.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import Reflux from 'reflux';


const DashboardActions = Reflux.createActions([
'setDashboards',
'previousDashboard',
'nextDashboard',
'startRotation'
]);

export { DashboardActions as default };

export default DashboardActions;
7 changes: 4 additions & 3 deletions src/browser/component-registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const ComponentRegistry = {
*/
addExtensions(extensions) {
_.forOwn(extensions, (components, extensionId) => {
ComponentRegistry.addExtension(extensionId, components)
ComponentRegistry.addExtension(extensionId, components);
});
},

Expand All @@ -34,7 +34,7 @@ const ComponentRegistry = {

get(type) {
if (!_components[type]) {
throw new Error('No component defined for type "' + type + '"');
throw new Error(`No component defined for type "${type}"`);
}

return _components[type];
Expand All @@ -45,4 +45,5 @@ const ComponentRegistry = {
}
};

export default ComponentRegistry;

export default ComponentRegistry;
Loading

0 comments on commit dd57c8f

Please sign in to comment.