-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from megawac/umd-modules
Full nodejs support
- Loading branch information
Showing
62 changed files
with
1,269 additions
and
1,161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
.vagrant | ||
doc | ||
node_modules | ||
*.out | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- "0.10" | ||
addons: | ||
firefox: "31.0" # 3.4->31.0 | ||
os: | ||
- linux | ||
before_install: | ||
# node-canvas dependency | ||
- sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ | ||
# ROS deps for examples | ||
- sudo sh -c 'echo "deb http://packages.ros.org/ros-shadow-fixed/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' | ||
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add - | ||
- sudo apt-get update -qq | ||
- sudo apt-get install ros-hydro-ros-base | ||
- sudo apt-get install ros-hydro-rosbridge-server ros-hydro-tf2-web-republisher ros-hydro-common-tutorials ros-hydro-rospy-tutorials ros-hydro-actionlib-tutorials | ||
- npm install -g grunt-cli karma-cli | ||
|
||
branches: | ||
only: | ||
- master | ||
- develop | ||
|
||
# Set up Xfvb for Firefox headless testing | ||
- "export DISPLAY=:99.0" | ||
- "sh -e /etc/init.d/xvfb start" | ||
before_script: | ||
- npm install -g karma grunt-cli | ||
- cd utils | ||
- npm install . | ||
|
||
- source /opt/ros/hydro/setup.bash | ||
- sh test/examples/setup_examples.sh | ||
script: | ||
- grunt build | ||
- rostopic list | ||
- npm test | ||
- npm run test-examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
roslibjs Build Setup | ||
==================== | ||
|
||
[Grunt](http://gruntjs.com/) is used for building, including concatenating, minimizing, documenting, linting, and testing. | ||
|
||
### Install Grunt and its Dependencies | ||
|
||
1. Install [Node.js](http://nodejs.org/) for your environment | ||
2. Install the build task runner, [Grunt](http://gruntjs.com/) | ||
|
||
```sh | ||
$ [sudo] npm install -g grunt | ||
``` | ||
|
||
3. Install the [Cario](http://cairographics.org/) graphics library | ||
- [System specific instaructions](https://github.com/Automattic/node-canvas/wiki/_pages) | ||
4. Install the dependencies and build dependencies | ||
|
||
```sh | ||
$ cd /path/to/roslibjs/ | ||
$ [sudo] npm install | ||
``` | ||
|
||
|
||
Easy installation for Ubuntu. `cd` to your local copy of this project. | ||
|
||
```sh | ||
# Install Node.js and NPM | ||
curl -sL https://deb.nodesource.com/setup | sudo bash - | ||
sudo apt-get install nodejs | ||
|
||
# Install Cario | ||
sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ | ||
|
||
# Install this projects Deps | ||
sudo npm install | ||
``` | ||
|
||
### Build with Grunt | ||
|
||
Before proceeding, please confirm you have installed the dependencies above. | ||
|
||
To run the build tasks: | ||
|
||
1. `cd /path/to/roslibjs/` | ||
2. `grunt build` | ||
|
||
`grunt build` will concatenate and minimize the files under src and replace roslib.js and roslib.min.js in the build directory. It will also run the linter and test cases. This is what [Travis CI](https://travis-ci.org/RobotWebTools/roslibjs) runs when a Pull Request is submitted. | ||
|
||
`grunt dev` will watch for any changes to any of the src/ files and automatically concatenate and minimize the files. This is ideal for those developing as you should only have to run `grunt dev` once. | ||
|
||
`grunt doc` will rebuild all JSDoc for the project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.