Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

nickpack/Methadone

Repository files navigation

CakePHP 2.x Site Build Boilerplate

This is an attempt at automating our cake builds at Cohaesus.

Requirements

Whats Included in the boilerplate?

  • Nick Pack's SCSS fork of Skeleton
  • Bower managed js dependencies
  • SCSS compilation
  • Minification and concatenation of JS and CSS
  • A number of grunt tasks to speed up development
  • Vagrant & Puppet nginx, php-fpm dev box configuration
  • CakePHP composer Plugin

Getting started

  1. Install VirtualBox or Vmware Fusion 5 (See links above in requirements)
  2. Install Vagrant (See links above in requirements)
  3. Clone project
  4. Edit package.json and update the project name and description

Starting the VM

In root of project type the following command to start the vagrant VM and configure using puppet

For default VirtualBox provider

vagrant up

For VMWare Fusion 5 Provider

vagrant up --provider vmware_fusion

The Vagrant file is configured to select the right box image depending on the provider.

Running a Build

SSH onto the VM and navigate to the /vagrant directory. This directory is mapped to the root of the project folder

vagrant ssh
cd /vagrant

There is a start.sh bash script that will do some basic housekeeping, and run the first grunt build

sh start.sh

The I/O performance of the VirtualBox VM is too poor to usefully run grunt watch, so you will need to manually build the project as you make changes. This can be done using:

grunt build

Alternatively if you have the VMWare Fusion the improved I/O grunt watch works just fine. You can run this using:

grunt watch

View the current build at http://127.0.0.1:8001 on your local machine

Configured Grunt Tasks

  • concat - Concatenates third party libs into one file, and project specific js into another
  • uglify - Minifies afore mentioned files via uglify
  • jshint - Lint project js files
  • sass - Compile SCSS files into one project CSS file
  • csslint - lint CSS syntax
  • cssmin - Minify project css file
  • swig - Compile static HTML versions of semi-dynamic templates
  • copy - Place all project related files in the build directory
  • watch - Watch for changes and rebuild
  • lint - Run jshint and csslint tasks
  • minify - Generate stylesheets from SCSS, concat js files and minify all
  • build - Prepare a complete development build
  • release - Prepare a complete production build with minification etc

Contributors

  • Nick Pack

Licence

Copyright (c) 2013 Nick Pack Licensed under the MIT license.

About

CakePHP 2.x Site Build Boilerplate (Because you'd have to be on heroin to use CakePHP)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages