Build Status:
The new version of droneshare - built upon the DroneKit. Please see our welcome letter.
This application is built using AngularJS and coffeescript.
Before we continue make sure your system is running with the latest stable versions of the following packages
you either want to download the latest version or use git to get either our own or your fork of the project.
to get our repository
git clone https://github.com/diydrones/droneshare.git
to get your fork
git clone [email protected]:YOUR-USERNAME/droneshare.git
or finally theres a zip download of the latest version available.
To install the app you need to install the packages required for this project, the app has Node package requirements and Bower library packages.
You can find the list of npm packages inside the packages.js file.
The bower list can be found inside the bower.json
to install just do
npm install
bower install
grunt bower:install
Configure your web server to the dist
folder on the app and run the build, prod or dev tasks
grunt build
this will generate the files your web server needs to launch the app
To run tests you need to run the test grunt task which builds the app then runs the tests
grunt test
If you are planning on debugging tests we recommend you use either the test or karma grunt tasks with the --watch option
grunt test --watch
grunt karma --watch
this will leave a process running watching for changes on the test files, which speeds up testing.
A pro-tip is to launch your browser at the url specified when running the tests
Here is an example excerpt output from grunt karma
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.16 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.7 (Mac OS X)]: Connected on socket tIC2TRlp_tzgnpb0U1mB with id 25791127
Notice the url from Karma http://localhost:9876/ open that on your browser so you can set debug breakpoints to help you debug your tests.
There are 3 ways of compiling the app depending on your needs
grunt build
- will compile the app preserving individual files (when run, files will be loaded on-demand)grunt
orgrunt dev
- same asgrunt
but will watch for file changes and recompile on-the-flygrunt prod
- will compile using optimizations. This will create one JavaScript file and one CSS file to demonstrate the power of r.js, the build optimization tool for RequireJS. And take a look at the index.html file. Yep - it's minified too.grunt test
- will compile the app and run all unit tests
Coffeescript is like javascript but with much less boilerplate code. It compiles down to javascript (trivially). If you've never used coffeescript, please see this five page user guide. If you still prefer javascript: We've got ya covered. Simply run the following grunt task.
grunt jslove
- will transpile all of the CoffeeScript files to JavaScript and throw out the Coffee.
This project uses a http://editorconfig.org/ file to specify source formatting conventions. We encourage you to install a suitable plug-in into your text-editor of choice.