Skip to content
Planet Learning Angular application
Branch: master
Clone or download
Latest commit 1f4f2ad May 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis Docker volume mount changes (fixes #2445) (#2447) Apr 29, 2019
design Manager Reports: Fix monitor error (fixes #3343) (#3372) Mar 13, 2019
docker User creation on production vagrant (fixes #3869) (#3874) May 23, 2019
e2e ng e2e test for Angular 6 (fixes #1436) (#1506) Jul 3, 2018
git-hooks Make pre-push hook executable (#3597) Apr 12, 2019
src Resources: Selected collections component (fixes #3699) (#3776) May 23, 2019
.dockerignore Prod version of planet docker (connects #4) (#86) Nov 7, 2017
.editorconfig Angular Prototype Aug 23, 2017
.gitattributes Vagrantfile: switch to box 0.2.2 (#103) Oct 24, 2017
.gitignore Ignore planet yml file in main directory (fixes #1730) (#1735) Jul 25, 2018
.htmlhintrc [#260] scss linting (Fixes #260) (#261) Jan 9, 2018
.mdlrc Add markdownlinter config for CodeClimate (#2983) Jan 17, 2019
.travis.yml ourNews: Add ourNews (connects #3386) (#3396) Mar 14, 2019
CONTRIBUTING.md Remove BeLL mentions in README, etc (#3134) Feb 12, 2019
LICENSE Create LICENSE Nov 14, 2017
README.md Update readme.md (fixes #3834) (#3843) May 20, 2019
Style-Guide.md Add i18n section to style guide (fixes #1342) (#1565) Jul 18, 2018
Vagrantfile User creation on production vagrant (fixes #3869) (#3874) May 23, 2019
angular.json Remove BeLL mentions in README, etc (#3134) Feb 12, 2019
couchdb-setup.sh Collections: Sort alphabetically (fixes #3652) (#3656) Apr 22, 2019
crowdin.yml ISO 639-2 (#1360) Jun 18, 2018
karma.conf.js Update to angular 6 (fixes #881) (#1247) Jun 7, 2018
package.json Version 0.8.2 (#3877) May 23, 2019
protractor.conf.js add e2e tests (protractor) (fixes #28) (#50) Sep 27, 2017
sass-lint.yml [#260] scss linting (Fixes #260) (#261) Jan 9, 2018
tsconfig.json Add PouchDB base service (#1355) Jun 28, 2018
tslint.json Drop Down List on Profile (fixes #1332) (#1335) Jul 3, 2018

README.md

Maintainability Build Status Docker Stars Docker Pulls Gitter

Planet Learning

Planet Learning is a generic learning system built in Angular & CouchDB.

Link to Angular Doc and Material Design.

To work on this

The only prerequisite is Vagrant. If you don't know about it, please do some research and try it. After cloning the repository, run vagrant up dev in the console. Once it's done installing the virtual machine it'll automatically start compiling the app. After about 10 seconds, you can open the app at localhost:3000.

Project guidelines

  • Please check out the project page for available tasks to work on.
  • Before contributing also be sure to read our style guide
  • Please clone the repository rather than forking, unless you're from outside the organization. It's easier for us to collaborate from a new branch on the same repository.
  • After cloning the repository please run npm run install-hooks to add the git hooks to your local repository.
  • If you see something that needs work, please create an issue. If the issue is on the frontend, please try to make it specific to one component.
  • To work on an issue, create a new branch with a descriptive title.
  • Please wait for at least two positive reviews before merging a PR into the master branch

Unit & end-to-end tests

There are two ways for running the tests. The first listed works from the host machine, and the second works after vagrant ssh dev and cd /vagrant:

npm run v-test (from host) or ng test (from vagrant) - Unit tests Open localhost:9876 once this is done compiling

npm run v-e2e (from host) or ng e2e (from vagrant) - End-to-end tests Results will appear in the console

Additional commands

Similarly, we have a few other npm commands that work from the host machine to run the ng commands from the Angular CLI

npm run v-serve = ng serve

npm run v-build = ng build

npm run v-lint = ng lint

npm run v-lint-fix = ng lint --fix This will fix any lint errors that TSLint can automatically fix

Also, the npm start command can include an additional LNG variable to serve from different language files. This must be run from within the vagrant (so after vagrant ssh dev and cd /vagrant) and runs in the format:

LNG=es npm start

This would serve the app from the Spanish language files.

Troubleshooting

I switched branches and now I'm missing a dependency...

The ideal solution would be to ssh into your vagrant and run npm install:

vagrant ssh dev
cd /vagrant
npm install

This doesn't always work. If you're having trouble or need to revert to the exact dependencies listed on the package.json, you need to remove all packages then install (after cd /vagrant above, run the commands):

sudo rm -rf node_modules/*
sudo npm install --unsafe-perm

The trailing /* will remove all files & sub-directories of node_modules. You won't be able to remove node_modules because of the link between the vagrant VM and your host.

Cannot GET /

There are two things you can try for this. First involves the node-sass module which can be problematic. You will need to rebuild it from the VM:

vagrant ssh dev
cd /vagrant
npm rebuild node-sass

The second is to rebuild the application. First you need to cancel the app in the screen with screen -x then CTRL-C. Then you can bring the app back up with one of the above commands or in another screen session with screen -dmS build bash -c 'cd /vagrant; ng serve'.

You can’t perform that action at this time.