Skip to content
require.js demo work for mpr news features redesign
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

This is a test project to combine the following into a development and deployment workflow:

  • require.js
  • slim framework
  • composer
  • jquery.pjax
  • grunt
  • bower



  • Local apache server with php 5.3 or higher, php 5.4.x preferred

  • node / npm

  • composer

      curl -sS | php
  • grunt (may require sudo)

      npm install -g grunt-cli
  • bower (may require sudo)

      npm install -g bower


First, clone the project to someplace on your computer that you can serve to a browser using Apache/MAMP.

    cd ~/Sites/
    git clone

Install required grunt, bower, and composer packages:

   npm install
   bower install
   composer install

Run grunt at least once to compile less and js files:


Depending on your local environment, you'll need to change apache to point at the public_html/ folder in this package. Apache should read index.php as the directory index file.

Project Dependencies

As dependencies change throughout the project, you'll need to stay up to date. To simultaneously update dependencies for Composer, Node, and Bower, run:

  grunt update

This is equivalient to:

  composer update
  bower update
  npm update


You can and should use grunt to watch files during development. Grunt will recompile js and scss/css changes as you make them. This also uses livereload to reload the page in the browser as changes are made. To put grunt into watch mode, run:

   grunt watch

NOTE: Presently, grunt does not reload on changes to php/tpl files

Production mode

If you want to simulate 'production' mode on your local environment, where scripts and css are minified and concatenated, first you'll need to compile all the scripts and css files:

  grunt deploy

Then change the SLIM_MODE in public/.htaccess:

SetEnv SLIM_MODE production 

Be careful not to commit this change to version control unless intended.


Run grunt test to run tests with PHPUnit. Currently all tests live in the /tests/ folder.

You can’t perform that action at this time.