This is our App based on our SDK.
You need to have the following tools installed globally on you machine:
Make sure to install Java on your local machine.
Clone the repo via git:
$ git clone https://github.com/sofa/app sofa-app && cd sofa-app
Install depencencies:
$ npm install
$ bower install
To run the app you have to make sure that a selenium server is running, since the inital build task will run all provided e2e tests. To run a selenium server all you have to do is to run
webdriver-manager start
The webdriver-manager comes with the installation of protractor (npm install -g protractor
).
After that simply run:
$ grunt watch
This will run the build
and the delta
task. You can now open a browser at http://localhost:9000
.
The task also takes care of re-running sub targets during development when changes occur.
To configure the app, makes changes in the build.conf.js
file accordingly.
grunt watch
- process build
tasks and starts a server for yougrunt build
- generates a build of the app. This can be run in the browser.grunt compile
- compiles a built app. The result is a production ready package.grunt compile-debug
- same as compile
without uglified JavaScriptgrunt deploy
- deploys the app.grunt deploy-debug
- same as deploy
without uglified JavaScript.Make sure to update dependency versions of sofa in the package.json. Working directly against unversioned npm packages totally breaks the whole idea of version control. Unfortunately we had that wrong for one week between versions 0.32.0 and 0.33.0 so that any ref you might check out in between could be broken in subtile different ways. Deployment packages are correct though since those add a fixed sofa dependency directly to version control.
The typical update process goes like this:
1. Create new versions of sofa dependencies that need updates.
grunt
in the sofa component to run tests and produce dist filesgrunt changelog
to generate the changelog accordinglypackage.json
and bower.json
with the new version number according to http://semver.org/chore(release): cutting the 0.3.4 release
git tag 0.3.4
)git push origin master && git push --tags
npm publish
2. OPTIONALLY (IF NEEDED): Create new version of sofa-base
grunt
in sofa-base
git tag 0.33.0
)git push origin master && git push --tags
3. Update the app
package.json
of the app to use the correct versions of the sofa dependencieschore(package.json): updating dependencies
sofa-base
make sure to also update the tag dependency in the app's package.json
grunt deploy --app-version=VERSION
with the correct version number (e.g. grunt deploy --app-version=0.50.0
)4. Deploy versions from the console
We'd love you to contribute. Please make sure to read the CONTRIBUTING guide line.