Planned and developed with leadership from VIF International Education, in partnership with Little Bird Games and the Digital Media and Learning Competition, supported by the John D. and Catherine T. MacArthur Foundation through a grant to the University of California, Irvine and administered by HASTAC.
This project recommends the use of Laravel Homestead 5.2 for development.
Install Laravel Homestead 5.2, official instructions can be found here.
Setup up the homestead vagrant box:
$ vagrant box add laravel/homestead
- In your home directory, install Homestead by running the following command (this will create a folder called Homestead and install it within):
$ git clone https://github.com/laravel/homestead.git Homestead
- To initialize Homestead, navigate to the Homestead folder and run:
$ bash init.sh
This will create the homestead.yaml file into ~/.homestead
Clone the process labs repository
- In your home directory, create a folder to house your homestead projects.
- Clone the process labs into its own folder within this 'projects' folder.
Set up the homestead.yaml file.
- Ensure that
authorizein the .yaml file point to the correct locations.
If you don't have a ssh key setup, set one up by running the following command:
$ ssh-keygen -t rsa -C "firstname.lastname@example.org"
This will create a
.sshfolder in your home directory.
- Set up your homestead projects folder to sync with the virtual machine by adding it under
folders: - map: ~/projects to: /home/vagrant/projects
- Add the process labs as one of your
sites: - ... ... - map: processlabs.app to: /home/vagrant/projects/process_labs/public
- To map this site to your localhost, append the following line to your systems hosts file:
This will allow us to view the process labs locally by going to this domain.
- Ensure that
Set up the process labs repository.
- We will need to start running our commands in the virtual machine. To do this we must start up the vagrant box and then ssh into it , which is done by running the following from our Homestead directory:
$ vagrant up $ vagrant ssh
- Navigate to your process labs directory within the virtual machine.
- Install the composer dependencies:
$ composer install
- Install the npm dependencies:
$ npm install
If this results in errors and you are on a Windows machine you may have to run
npm install --no-bin-links. This command may result in error
npm ERR! Maximum call stack size exceeded. If this happens, run
npm install --no-bin-linksagain and it should finish installing the dependencies.
- Install bower dependencies:
$ bower install
- Generate MySQL DB tables and roles:
$ php artisan migrate # generates MySQL DB tables $ php artisan bouncer:seed # adds roles to DB. For roles see: App\Providers\BouncerServiceProvider.php
- Run Gulp to compile sass into a css file and to build/ compile ReactJS:
If this results in an error related to one of the npm dependencies, try reinstalling it by running
npm install <package-name>and then try again.
Error: ENOENT: no such file or directory, scandir '/home/vagrant/sites/DMLmh/node_modules/node-sass/vendor'run
npm install node-sass)
$ gulp watch is also available
You're done, open
http://processlabs.app:8000in your browser to view your local process labs site!