Skip to content

Commit

Permalink
Merge pull request #66 from hkelly93/enhancement/5/Rewrite-source-in-ES6
Browse files Browse the repository at this point in the history
Enhancement/5/rewrite source in es6
  • Loading branch information
hkelly93 committed Jul 6, 2016
2 parents db23fca + b224a68 commit f7d0317
Show file tree
Hide file tree
Showing 13 changed files with 1,592 additions and 1,576 deletions.
1 change: 1 addition & 0 deletions .jshintrc
@@ -1,5 +1,6 @@
{
"maxerr": 50,
"esversion": 6,
"bitwise": true,
"camelcase": true,
"curly": true,
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -61,3 +61,4 @@
* Fixed a bug where the width of the SVG was being determined incorrectly.
* Added a way to not show the value on the tooltip by setting the `valueKeyName` to an empty string.
* Added a cursor pointer if there is an onClick function.
* Rewrote the source in ES6 and d3 v4.1.0
16 changes: 13 additions & 3 deletions Gruntfile.js
Expand Up @@ -12,6 +12,16 @@ module.exports = function(grunt) {
dest: 'dest/d3.relationshipgraph.js'
}
},
babel: {
options: {
presets: ['es2015']
},
dist: {
files: {
'dest/d3.relationshipgraph.js': 'dest/d3.relationshipgraph.js'
}
}
},
uglify: {
options: {
mangle: false
Expand Down Expand Up @@ -60,6 +70,7 @@ module.exports = function(grunt) {
}
});

grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
Expand All @@ -68,7 +79,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-mocha');

grunt.registerTask('default', ['jshint', 'jscs', 'concat', 'uglify', 'csslint', 'cssmin']);
grunt.registerTask('test', ['jshint', 'jscs', 'concat', 'uglify', 'csslint', 'cssmin', 'mocha']);

grunt.registerTask('default', ['jshint', 'jscs', 'concat', 'babel', 'uglify', 'csslint', 'cssmin']);
grunt.registerTask('test', ['jshint', 'jscs', 'concat', 'babel', 'uglify', 'csslint', 'cssmin', 'mocha']);
};
5 changes: 4 additions & 1 deletion bower.json
Expand Up @@ -3,11 +3,14 @@
"description": "A D3 graph to show parent child relationships.",
"main": "src/d3-tip.js, src/index.js",
"dependencies": {
"d3": "^3.5.17"
"d3": "^4.0.1"
},
"devDependencies": {
"babel-preset-es2015": "^6.9.0",
"chai": "~3.5.0",
"mocha": "~2.5.3",
"grunt": "^1.0.1",
"grunt-babel": "^6.0.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-csslint": "^1.0.0",
"grunt-contrib-cssmin": "^1.0.1",
Expand Down
1 change: 1 addition & 0 deletions d3.relationshipgraph.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f7d0317

Please sign in to comment.