http://github.com/OpenShades/wearscript-playground
The web-based IDE for WearScript. Write code, pair glass, save, and enjoy.
Clone repo and submodules
git clone git@github.com:OpenShades/wearscript-playground.git
cd wearscript-playground
git submodule update --init
Configure API server
cp server/config.go.example server/config.go
Edit server/config.go to be in single user mode.
Compile API Server (requires a working Go environment)
mkdir $HOME/go
cd server
sh install.sh
cd ..
Install CLI tools
sudo npm install -g grunt-cli grunt bower yo generator-angular
Install client and grunt build dependencies
bower install
npm install
Find and install an 'editorconfig' plugin in your IDE of choice
Optional but reccommended for code consistancy.
Install latest dependencies (if *.json files have changed)
bower install
npm install
Compile
grunt build
Built version of application will be availible in the 'dist' directory.
To serve live uncompressed tree with live-reload on change:
grunt serve
To serve live compiled version:
grunt serve:dist
By default application will be accessible at http://YOUR_IP:9000
This setup is compatable with the yo angular generator.
You can use any "yo angular" commands to generate boilerplate complete with tests relevant to extension you want to make. You can of course just write anything by hand and these are only here as optional helpers.
Some common commands:
# Route
yo angular:route someroute
# Controller
yo angular:controller controllerName
# Directive
yo angular:directive directiveName
# Service
yo angular:service serviceName
# View
yo angular:view someview
In order to manage third party open source dependencies and ensure compatibility and cross-dependency sanity, please use package managers.
As a general rule of thumb, if it is code you did not write and your project needs it, it probably should be handeled by a package manager and not committed to the repo. It also makes sure the git-stats are accurate which is valuable to track team progress.
To add a client-side javascript dependency do:
bower install some-awesome-library --save
This will update the 'bower.json' file and ensure other developers install this as well. It will also make best efforts to install a version of a library that is compatible with existing libraries being used in the project.
To run all current tests:
grunt test
To run e2e testing
grunt test:e2e
If you run into errors please ensure you have gconf and chromedriver installed globally
sudo npm install -g chromedriver
sudo apt-get install gconf