diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..296027c --- /dev/null +++ b/.eslintrc @@ -0,0 +1,17 @@ +rules: + indent: + - 2 + - 4 + quotes: + - 2 + - single + linebreak-style: + - 2 + - unix + semi: + - 2 + - always +env: + es6: true + browser: true +extends: 'eslint:recommended' diff --git a/.gitignore b/.gitignore index 22d0d82..91be243 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ vendor +node_modules diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..6be93b9 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,6 @@ +/** + * Debugging: try running "npm cache clear" if things aren't working as expected. + */ +module.exports = function(grunt) { + require('load-grunt-config')(grunt); +}; diff --git a/grunt/aliases.yaml b/grunt/aliases.yaml new file mode 100644 index 0000000..5f71f4f --- /dev/null +++ b/grunt/aliases.yaml @@ -0,0 +1,2 @@ +default: + - 'concurrent:watch' diff --git a/grunt/concurrent.js b/grunt/concurrent.js new file mode 100644 index 0000000..7177d2c --- /dev/null +++ b/grunt/concurrent.js @@ -0,0 +1,18 @@ +/** + * CONCURRENT + * ========== + * Runs several multiple blocking tasks at once (like "watch"). + * http://stackoverflow.com/questions/17585385/how-to-run-two-grunt-watch-tasks-simultaneously + */ + +module.exports = { + options: { + logConcurrentOutput: true, + }, + watch: { + tasks: [ + //'nodemon', + 'watch' + ], + } +}; diff --git a/grunt/eslint.js b/grunt/eslint.js new file mode 100644 index 0000000..ba98c43 --- /dev/null +++ b/grunt/eslint.js @@ -0,0 +1,8 @@ +/** + * ESLINT + * ====== + * Does not support 'subtasks' (like :all). + */ +module.exports = { + target: ['js/*.js'] +}; diff --git a/grunt/watch.js b/grunt/watch.js new file mode 100644 index 0000000..3b66750 --- /dev/null +++ b/grunt/watch.js @@ -0,0 +1,18 @@ +/** + * WATCH + * ===== + * Process for watching changes to files in real time. + */ +module.exports = { + js: { + files: [ + 'js/**/*.js' + ], + tasks: [ + 'eslint' + ], + options: { + livereload: true + }, + }, +}; diff --git a/index.html b/index.html index e69de29..8d0ca52 100644 --- a/index.html +++ b/index.html @@ -0,0 +1,21 @@ + + + + + D3 + + + + + + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..4e9a545 --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "ben.burlingham", + "version": "0.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "chalk": "^1.1.1", + "express": "^4.13.3", + "grunt": "^0.4.5", + "grunt-concurrent": "^2.0.3", + "grunt-contrib-watch": "^0.6.1", + "grunt-eslint": "^17.1.0", + "load-grunt-config": "^0.17.2" + } +}