This project is the front-end, Angular.js-powered user experience for the Playfully.org web site.
Make sure you have Node.js installed.
- git clone git@github.com:GlasslabGames/Playfully.org.git
- cd Playfully.org
- Ensure that you are using node.js 0.10
$ . ~/.nvm/nvm.sh $ nvm install 0.10 $ nvm use 0.10 $ nvm alias default 0.10
- sudo npm -g install grunt-cli karma bower
- sudo npm install
- bower install
- grunt watch (Note: this will run non-stop, as it is monitoring.)
-
Not sure if shell environment is properly restored on reboot, so:
. ~/.nvm/nvm.sh -
cd Playfully.org
-
sudo npm -g install grunt-cli karma bower
-
sudo npm install
-
bower install
-
grunt watch
Playfully makes use of Protractor for end-to-end browser-based testing from a user's perspective. Protractor relies on a local installation of Selenium, which is run by a process called webdriver-manager. At the moment it expects this to be available system wide. In order to ensure this, run these steps:
- npm install -g protractor
- Download http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar (requires Java)
- Run server with:
$ java -jar /path/to/selenium-server-standalone-2.41.0.jar
- Launch tests with :
$ grunt mocha
Strings in the Playfully app have been extracted into a single file, located at /src/assets/i18n/locale-en.json. This is to centralize text for possible future CMSification, and to bake in internationalization support from the outset.
To add a new translation:
- Copy the locale-en.json file, renaming to the appropriate language abbreviation.
- Leaving all keys in the JSON file the same
- Translate their associated values to the new language
To add new content:
- Open locale-en.json
- If it's an existing page, find its section by key (e.g. 'home.about.section2'), and choose an appropriate extension for the content you're adding
- Create the "key":"value" pair
- In the page template, add an element with an ng-binding whose value looks like: data-ng-bind="'home.about.section2.yourContent' | translate" (the single quotes are important)
In order to test Edmodo registrations without having to create new Edmodo users, the user can be deleted from the database. It may be necessary to disable foreign keys first:
SET FOREIGN_KEY_CHECKS=0; -- to disable them
DELETE FROM GL_USER WHERE LOGIN_TYPE = 'edmodo';
SET FOREIGN_KEY_CHECKS=1; -- to re-enable them
joe+edmodo.teacher@instituteofplay.org
test
joeedmodostudent
test
code to register for class: vuebgk