Created
September 18, 2015 22:04
-
-
Save hoorayimhelping/180e40590e4e89a50c2b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/gulpfile.js b/gulpfile.js | |
| index 8dcc89b..6e14dc3 100644 | |
| --- a/gulpfile.js | |
| +++ b/gulpfile.js | |
| @@ -32,7 +32,7 @@ gulp.task('lint', function() { | |
| paths.js_test + '*.js', | |
| 'gulpfile.js' | |
| ]) | |
| - .pipe(jshint()) | |
| + .pipe(jshint({ esnext: true })) | |
| .pipe(jshint.reporter('default', { verbose: true })) | |
| .pipe(jshint.reporter('fail')); | |
| }); | |
| @@ -63,3 +63,6 @@ gulp.task('build', function() { | |
| gulp.task('default', ['env-dev', 'lint', 'test', 'transform', 'build']); | |
| gulp.task('production', ['env-prod', 'lint', 'test', 'transform', 'build']); | |
| gulp.task('pre-commit', ['production']); | |
| + | |
| +gulp.task('dev', ['development']); | |
| +gulp.task('prod', ['production']); | |
| diff --git a/index.html b/index.html | |
| index e289f9f..a4214f0 100644 | |
| --- a/index.html | |
| +++ b/index.html | |
| @@ -11,4 +11,4 @@ | |
| <script type="text/javascript" src="js/app.js"></script> | |
| </body> | |
| -</html> | |
| \ No newline at end of file | |
| +</html> | |
| diff --git a/js/app.js b/js/app.js | |
| index 1891ce9..d7c58ef 100644 | |
| --- a/js/app.js | |
| +++ b/js/app.js | |
| @@ -20,35 +20,20 @@ Renderer.prototype = { | |
| this.context.fillRect(0, 0, this.context.canvas.clientWidth, this.context.canvas.clientHeight); | |
| }, | |
| - options: function(options) { | |
| - this.defaults(); | |
| - if (options.hasOwnProperty('lineWidth')) { | |
| - this.context.lineWidth = options.lineWidth; | |
| - } | |
| - | |
| - if (options.hasOwnProperty('strokeStyle')) { | |
| - this.context.strokeStyle = options.strokeStyle; | |
| - } | |
| - }, | |
| - | |
| defaults: function() { | |
| this.context.fillStyle = "#FFF"; | |
| this.context.strokeStyle = "#000"; | |
| this.context.lineWidth = 5; | |
| }, | |
| - circle: function(x, y, radius, options) { | |
| - this.options(options); | |
| - | |
| + circle: function(x, y, radius) { | |
| this.context.beginPath(); | |
| this.context.arc(x, y, radius, 0, 2 * Math.PI); | |
| this.context.stroke(); | |
| this.context.closePath(); | |
| }, | |
| - line: function(start_x, start_y, end_x, end_y, options) { | |
| - this.options(options); | |
| - | |
| + line: function(start_x, start_y, end_x, end_y) { | |
| this.context.beginPath(); | |
| this.context.moveTo(start_x, start_y); | |
| this.context.lineTo( | |
| diff --git a/js/maps/kerbol_system.js b/js/maps/kerbol_system.js | |
| index def8374..30c32ea 100644 | |
| --- a/js/maps/kerbol_system.js | |
| +++ b/js/maps/kerbol_system.js | |
| @@ -29,4 +29,4 @@ var edges = { | |
| // es6 !! | |
| module.exports = { | |
| nodes, edges | |
| -}; | |
| \ No newline at end of file | |
| +}; | |
| diff --git a/js/rendering/canvas.js b/js/rendering/canvas.js | |
| index 5d962df..8a95147 100644 | |
| --- a/js/rendering/canvas.js | |
| +++ b/js/rendering/canvas.js | |
| @@ -19,35 +19,20 @@ Renderer.prototype = { | |
| this.context.fillRect(0, 0, this.context.canvas.clientWidth, this.context.canvas.clientHeight); | |
| }, | |
| - options: function(options) { | |
| - this.defaults(); | |
| - if (options.hasOwnProperty('lineWidth')) { | |
| - this.context.lineWidth = options.lineWidth; | |
| - } | |
| - | |
| - if (options.hasOwnProperty('strokeStyle')) { | |
| - this.context.strokeStyle = options.strokeStyle; | |
| - } | |
| - }, | |
| - | |
| defaults: function() { | |
| this.context.fillStyle = "#FFF"; | |
| this.context.strokeStyle = "#000"; | |
| this.context.lineWidth = 5; | |
| }, | |
| - circle: function(x, y, radius, options) { | |
| - this.options(options); | |
| - | |
| + circle: function(x, y, radius) { | |
| this.context.beginPath(); | |
| this.context.arc(x, y, radius, 0, 2 * Math.PI); | |
| this.context.stroke(); | |
| this.context.closePath(); | |
| }, | |
| - line: function(start_x, start_y, end_x, end_y, options) { | |
| - this.options(options); | |
| - | |
| + line: function(start_x, start_y, end_x, end_y) { | |
| this.context.beginPath(); | |
| this.context.moveTo(start_x, start_y); | |
| this.context.lineTo( | |
| @@ -75,4 +60,4 @@ Renderer.prototype = { | |
| } | |
| }; | |
| -module.exports = Renderer; | |
| \ No newline at end of file | |
| +module.exports = Renderer; | |
| diff --git a/package.json b/package.json | |
| index 6833bde..5bd9d3b 100644 | |
| --- a/package.json | |
| +++ b/package.json | |
| @@ -18,7 +18,9 @@ | |
| "gulp-shell": "^0.4.3", | |
| "gulp-tape": "0.0.3", | |
| "guppy-pre-commit": "^0.2.1", | |
| + "react": "^0.13.3", | |
| "reactify": "^1.1.1", | |
| + "tape": "^4.2.0", | |
| "vinyl-source-stream": "^1.1.0" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment