Skip to content

Commit

Permalink
Merge pull request #20 from paradox41/master
Browse files Browse the repository at this point in the history
Add grunt-umd and grunt-jsbeautifier
  • Loading branch information
TomNeyland committed Oct 23, 2014
2 parents 3d8ce8e + 8b0c8ed commit b26de6b
Show file tree
Hide file tree
Showing 6 changed files with 329 additions and 262 deletions.
4 changes: 3 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"predef": [
"angular",
"_",
"dc"
"dc",
"define",
"d3"
]
}
44 changes: 40 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,45 @@ module.exports = function(grunt) {
banner: '<%= meta.banner %>'
},
dist: {
src: '<%= concat.dist.dest %>',
src: '<%= yo.dist %>/<%= pkg.name %>.js',
dest: '<%= yo.dist %>/<%= pkg.name %>.min.js'
}
}
},
umd: {
dist: {
src: '<%= yo.dist %>/<%= pkg.name %>.js',
objectToExport: 'angularDc',
deps: {
args: ['angular', 'dc', '_', 'd3'],
'default': ['angular', 'dc', 'lodash', 'd3'],
amd: {
indent: ' ',
items: ['angular', 'dc', 'lodash', 'd3'],
prefix: '\'',
separator: ',',
suffix: '\''
},
global: {
indent: ' ',
items: ['angular', 'dc', '_', 'd3'],
prefix: 'root.',
separator: ',',
suffix: ''
}
}
}
},
jsbeautifier: {
files: ['<%= yo.dist %>/<%= pkg.name %>.js'],
options: {
js: {
braceStyle: 'collapse',
indentChar: ' ',
indentLevel: 0,
indentSize: 4
}
}
},
});

grunt.registerTask('test', [
Expand All @@ -173,9 +208,10 @@ module.exports = function(grunt) {

grunt.registerTask('build', [
'clean:dist',
'less:dist',
'ngmin:dist',
'uglify:dist'
'umd:dist',
'uglify:dist',
'jsbeautifier'
]);

grunt.registerTask('release', [
Expand Down
Loading

0 comments on commit b26de6b

Please sign in to comment.