@robot-web-tools/ros3djs
Version:
The standard ROS Javascript Visualization Library
93 lines (89 loc) • 1.96 kB
JavaScript
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
build: {
src : ['./src/*.js', './src/**/*.js'],
dest : './build/ros3d.js'
}
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
files: [
'Gruntfile.js',
'./build/ros3d.js'
]
},
karma: {
build: {
configFile: './test/karma.conf.js',
singleRun: true,
browsers: ['PhantomJS']
}
},
uglify: {
options: {
report: 'min'
},
build: {
src: './build/ros3d.js',
dest: './build/ros3d.min.js'
}
},
watch: {
dev: {
options: {
interrupt: true
},
files: [
'./src/*.js',
'./src/**/*.js'
],
tasks: ['concat']
},
build_and_watch: {
options: {
interrupt: true
},
files: [
'Gruntfile.js',
'.jshintrc',
'./src/*.js',
'./src/**/*.js'
],
tasks: ['build']
}
},
clean: {
options: {
force: true
},
doc: ['./doc']
},
jsdoc: {
doc: {
src: [
'./src/*.js',
'./src/**/*.js'
],
options: {
destination: './doc',
configure: 'jsdoc_conf.json'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-karma');
grunt.registerTask('dev', ['concat', 'watch']);
grunt.registerTask('build', ['concat', 'jshint', 'uglify']);
grunt.registerTask('build_and_watch', ['watch']);
grunt.registerTask('doc', ['clean', 'jsdoc']);
};