Skip to content

Commit

Permalink
Merge pull request RobotWebTools#30 from rctoris/devel
Browse files Browse the repository at this point in the history
Misc. Changes
  • Loading branch information
baalexander committed Apr 9, 2013
2 parents e66d8ec + 6521b7c commit 1340190
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ autoWatch = true;
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers = ['PhantomJS'];
// browsers = ['PhantomJS'];


// If browser does not capture in given timeout [ms], kill it
Expand Down
20 changes: 14 additions & 6 deletions utils/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ module.exports = function(grunt) {
},
jshint: {
options: {
jshintrc: '.jshintrc',
jshintrc: '.jshintrc'
},
files: [
'Gruntfile.js',
'../build/roslib.js'
],
]
},
karma: {
build: {
configFile: '../test/karma.conf.js',
singleRun: true
singleRun: true,
browsers: ['PhantomJS']
}
},
uglify: {
Expand Down Expand Up @@ -56,8 +57,14 @@ module.exports = function(grunt) {
tasks: ['build']
}
},
jsdoc : {
doc : {
clean: {
options: {
force: true
},
doc: ['../doc']
},
jsdoc: {
doc: {
src: [
'../src/RosLib.js',
'../src/**/*.js'
Expand All @@ -73,12 +80,13 @@ module.exports = function(grunt) {
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', 'karma', 'uglify']);
grunt.registerTask('build_and_watch', ['watch']);
grunt.registerTask('doc', ['jsdoc']);
grunt.registerTask('doc', ['clean', 'jsdoc']);
};

12 changes: 7 additions & 5 deletions utils/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
roslibjs build setup
roslibjs Build Setup
====================

[Grunt](http://gruntjs.com/) is used for building, including concatenating,
minimizing, documenting, linting, and testing.

### Install Grunt and its dependencies
### Install Grunt and its Dependencies

#### Ubuntu

1. Install Node.js and its package manager, NPM
* `sudo apt-get install python-software-properties`
* `sudo add-apt-repository ppa:chris-lea/node.js`
* `sudo apt-get install nodejs`
* `sudo apt-get update && sudo apt-get install nodejs phantomjs`
2. Install Grunt and the test runner [Karma](http://karma-runner.github.io/)
* `sudo npm install -g grunt-cli karma`
* `sudo rm -rf ~/.npm ~/tmp`
3. Install the Grunt tasks specific to this project
* `cd /path/to/roslibjs/utils/`
* `npm install .`
4. (Optional) To generate the documentation, you'll need Java and JSDoc. Documentation generation is not required for patches.
* `sudo apt-get install jsdoc-toolkit`
4. (Optional) To generate the documentation, you'll need to setup Java. Documentation generation is not required for patches.
* `echo "export JAVA_HOME=/usr/lib/jvm/default-java/jre" >> ~/.bashrc`
* `source ~/.bashrc`

#### OS X

Expand Down
3 changes: 2 additions & 1 deletion utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"grunt-karma": "~0.3.0",
"grunt-contrib-watch": "~0.3.1",
"grunt-contrib-uglify": "~0.2.0",
"grunt-jsdoc": "~0.3.0"
"grunt-jsdoc": "~0.3.0",
"grunt-contrib-clean": "~0.4.0"
}
}

0 comments on commit 1340190

Please sign in to comment.