To run the app, follow these steps.
- Ensure that NodeJS version 4 or greater is installed. This provides the platform on which the build tooling runs.
Note: The NodeJS/NPM version of Ubuntu 14.04 is really old and does not work. Therefore remove already installed NodeJS/NPM packages (sudo apt-get remove nodejs npm) and follow these instructions, to install a newer version of NodeJS/NPM.
- From the project folder, execute the following command:
npm install
- Ensure that Gulp is installed globally. If you need to install it, use the following command:
npm install -g gulp
Note: Global installations have to be run as root or sudo. To avoid this, you can use a virtual node environment (e.g. nodeenv).
Note: Gulp must be installed globally, but a local version will also be installed to ensure a compatible version is used for the project.
- Ensure that jspm is installed globally. If you need to install it, use the following command:
npm install -g jspm
Note: Global installations have to be run as root or sudo. To avoid this, you can use a virtual node environment (e.g. nodeenv).
Note: jspm must be installed globally, but a local version will also be installed to ensure a compatible version is used for the project.
Note: jspm queries GitHub to install semver packages, but GitHub has a rate limit on anonymous API requests. It is advised that you configure jspm with your GitHub credentials in order to avoid problems. You can do this by executing
jspm registry config github
and following the prompts. If you choose to authorize jspm by an access token instead of giving your password (see GitHubSettings > Personal Access Tokens
),public_repo
access for the token is required.
- Install the client-side dependencies with jspm:
jspm install -y
Note: Windows users, if you experience an error of "unknown command unzip" you can solve this problem by doing
npm install -g unzip
and then re-runningjspm install
.
- To run the app, execute the following command:
gulp watch
- Browse to http://localhost:9000 to see the app. You can make changes in the code found under
src
and the browser should auto-refresh itself as you save files.
The Skeleton App uses BrowserSync for automated page refreshes on code/markup changes concurrently across multiple browsers. If you prefer to disable the mirroring feature set the ghostMode option to false
To run the simulation and rosbridge websocket, follow these steps.
- Install Turltebot Gazebo Simulation and Rosbridge packages.
- Launch Robopatrol Simulation
roslaunch robopatrol simulation.launch
To run the app under Electron, follow these steps.
- Install Electron
npm install electron-prebuilt -g
- To start the app, execute the following command:
electron index.js
Note: If you use electron every time or are packaging and so-forth, Then change this line in package.json from
"main": "dist/main.js",
to"main": "index.js",
Build the app (this will give you a dist directory)
gulp build
To start the app, execute the following command:
electron .
Bundling is performed by Aurelia Bundler. A gulp task is already configured for that. Use the following command to bundle the app:
gulp bundle
You can also unbundle using the command bellow:
gulp unbundle
To start the bundled app, execute the following command:
gulp serve-bundle
The configuration is done by bundles.js
file.
Under options
of dist/aurelia
add rev: true
to add bundle file revision/version.
You can run the tests with this command:
gulp test
Or with code coverage:
gulp cover
Integration tests are performed with Protractor.
- Place your E2E-Tests into the folder
test/e2e/src
- Install the necessary webdriver
gulp webdriver-update
-
Configure the path to the webdriver by opening the file
protractor.conf.js
and adjusting theseleniumServerJar
property. Typically its only needed to adjust the version number. -
Make sure your app runs and is accessible
gulp watch
- In another console run the E2E-Tests
gulp e2e
A gulp task is already configured for that. Use the following command to export the app:
gulp export
The app will be exported into export
directory preserving the directory structure.
The configuration is done by bundles.js
file.
In addition, export.js
file is available for including individual files.