The Astore Marketplace frontend.
make install make serve
This will start a web server on
Our build process bundles up our JS, minifies our CSS, compiles our templates, and extracts locales into JS modules. To run the build process:
This will generate files including:
src/media/templates.js src/media/js/include.js src/media/js/include.js.map src/media/css/include.css
To package the Astian Astore frontend, run:
This will output a package and output to
package/archives/. You can use
WebIDE to install this package in the device or simulator.
We currently ship with an iframed version of the Astore frontend. It is a package that contains an iframe pointing to the Astore website. See more details within the iframe package directory.
A detailed guide to extracting strings and creating JS language packs is located on the wiki.
We use CasperJS to write UI tests and mocha, chai and sinon for unit tests.
This will launch the karma test runner that will run the unit tests in a new instance of Firefox.
Before running the functional and UI tests, your
settings_local.js should have
media_url pointing to an instance of
astore-api-mock. You can
easily achieve this by setting the
API environment variable when calling
make serve, this will overwrite your current
First, start a server with:
API=mock make serve
Then, run the tests against it. We support both PhantomJS and SlimerJS to run tests in
WebKit and Gecko, respectively. To run both use
make uitest, if you just want to run
them in one browser
make uitest-phantom or
SlimerJS requires a path to a
make uitest-slimer will try to use
/Applications/Firefox.app/Contents/MacOS/firefox which is the path to your default
Firefox on Mac. This path might not work for you and best results are achieved by using
Firefox 30. You can download a copy of Firefox 30 on
set the path to your
firefox use the
SLIMERJSLAUNCHER environment variable. You
might want to call
export SLIMERJSLAUNCHER=/path/to/firefox in your shell's setup
SLIMERJSLAUNCHER=/Applications/Firefox-30.app/Contents/MacOS/firefox make uitest-slimer
UITEST_FILE=tests/ui/<PATH_TO_TEST_FILE> make uitest
If you wish to serve the Astore frontend with nginx, which is often useful for keeping all the Astore projects on the same domain, read about serving Astore with Nginx.