Skip to content

Commit

Permalink
Merge 43d9d39 into 6736215
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Feb 15, 2016
2 parents 6736215 + 43d9d39 commit d785882
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
out.js
coverage
8 changes: 8 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"env": {
"node": true
},
"rules": {
"quotes": [2, "single"]
}
}
3 changes: 2 additions & 1 deletion browser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*global document */
'use strict';
var d3 = require('d3');
var msg2svg = require('./index.js').bind(null, document);
Expand All @@ -11,7 +12,7 @@ var redraw = function(seed) {
height: 400
});
d3.select('body')
.node().appendChild(svg.node())
.node().appendChild(svg.node());

};

Expand Down
1 change: 0 additions & 1 deletion drawers/circles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';
var getColor = require('../helpers/colors');
var d3 = require('d3');

module.exports = function(svg, getRandom) {
var width = svg.attr('width');
Expand Down
1 change: 1 addition & 0 deletions drawers/lines.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict';
var getColor = require('../helpers/colors');
var d3 = require('d3');

Expand Down
3 changes: 2 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict';
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var browserify = require('browserify');
Expand All @@ -10,7 +11,7 @@ gulp.task('scripts', function() {
});

gulp.task('watch', function() {
gulp.watch(['**/*.js', '!out.js', '!node_modules/**/*'] , ['scripts']);
gulp.watch(['**/*.js', '!out.js', '!node_modules/**/*'], ['scripts']);
});


Expand Down
1 change: 1 addition & 0 deletions helpers/colors.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict';
module.exports = function(getRandom) {
var colors = [
'blue',
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function generateSvg(document, randomseed, opts) {
var getRandom = function(max) {
return Math.floor(random() * max);
};

var svg = document.createElementNS(d3.ns.prefix.svg, 'svg');
var svgContainer = d3.select(svg);
svgContainer
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "test"
},
"scripts": {
"test": "mocha",
"test": "eslint . && mocha",
"coverage": "istanbul cover -- _mocha",
"build": "gulp scripts"
},
Expand All @@ -28,10 +28,10 @@
"devDependencies": {
"browserify": "^12.0.2",
"coveralls": "^2.11.1",
"eslint": "^1.10.3",
"eslint": "^2.0.0",
"gulp": "^3.8.7",
"istanbul": "^0.4.2",
"jsdom": "^8.0.1",
"jsdom": "^8.0.2",
"mocha": "^2.4.4",
"should": "^8.0.2",
"vinyl-source-stream": "^0.1.1"
Expand Down
7 changes: 7 additions & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"globals": {
"describe": false,
"it": false,
"before": false
}
}
3 changes: 2 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';
var msg2svg = require('./..');
var should = require('should');
require('should');
var fs = require('fs');
var document = require('jsdom').jsdom();

Expand Down

0 comments on commit d785882

Please sign in to comment.