morris.js/grunt.js

57 lines
1.3 KiB
JavaScript
Raw Permalink Normal View History

2012-06-26 08:15:54 +02:00
module.exports = function (grunt) {
grunt.initConfig({
coffee: {
lib: {
2012-09-01 12:04:06 +02:00
src: ['build/morris.coffee'],
dest: '.',
2012-06-26 08:15:54 +02:00
options: { bare: false }
},
spec: {
src: ['build/spec.coffee'],
dest: 'build',
options: { bare: true }
2012-06-26 08:15:54 +02:00
}
},
concat: {
2012-10-28 19:55:37 +01:00
'build/morris.coffee': [
'lib/morris.coffee',
'lib/morris.grid.coffee',
'lib/morris.hover.coffee',
2012-10-28 19:55:37 +01:00
'lib/morris.line.coffee',
'lib/morris.area.coffee',
'lib/morris.bar.coffee',
2012-10-28 19:55:37 +01:00
'lib/morris.donut.coffee'
],
'build/spec.coffee': ['spec/support/**/*.coffee', 'spec/lib/**/*.coffee']
2012-06-26 08:15:54 +02:00
},
less: {
all: {
src: 'less/*.less',
dest: 'morris.css',
options: {
compress: true
}
}
},
2012-06-26 08:15:54 +02:00
min: {
'morris.min.js': 'morris.js'
},
mocha: {
spec: {
src: 'spec/specs.html',
run: true
2012-06-26 08:15:54 +02:00
}
2012-10-19 10:07:30 +02:00
},
watch: {
files: ['lib/**/*.coffee', 'spec/lib/**/*.coffee', 'spec/support/**/*.coffee', 'less/**/*.less'],
2012-10-19 10:07:30 +02:00
tasks: 'default'
2012-06-26 08:15:54 +02:00
}
});
grunt.loadNpmTasks('grunt-coffee');
grunt.loadNpmTasks('grunt-mocha');
grunt.loadNpmTasks('grunt-contrib-less');
2012-06-26 08:15:54 +02:00
grunt.registerTask('default', 'concat coffee less min mocha');
2012-06-26 08:15:54 +02:00
};