Grunt task management for Zend Framework 2

Installs: 4 415

Dependents: 0

Stars: 11

Watchers: 1

Language: JavaScript

2.4.6 2015-07-03 08:11 UTC

README

Grunt Survival Pack Grunt task management for Zend Framework 2

Grunt task management for Zend Framework 2 and beyond. Manage your local frontend development and continuous integration process over a large amount of projects with a single dependency - we take care to update your projects to the latest Grunt components.

Build Status Dependency Status Dependency Status Repo Size Latest Stable Version Latest Stable Version Total Downloads License

Components

  • PHP and Javascript unit tester
  • PHP code sniffer
  • LESS and SASS preprocessor
  • CSS autoprefixer
  • CSS colorguard
  • CSS and Javascript beautifier
  • Table of contents generator
  • CSS, HTML, Javascript and JSON linter
  • GIF, JPG, PNG and SVG image optimizer
  • Mobile first fallback generator
  • CSS and Javascript minifier

Structure

Tasks are configured to match the Zend Framework 2 folder structure.

  • module
  • public
  • tests
  • vendor

Requirements

node.js - Install using apt-get install nodejs

node package manager - Install using apt-get install npm

grunt.js - Install using npm install -g grunt-cli

Config

Each task is configured inside config/{task}.json and can be overriden using the --config option.

Usage

Run sh vendor/bin/gsp.sh {options} from console.

Example:

Perform the test task in verbose mode:

sh vendor/bin/gsp.sh test --verbose

Override the config path:

sh vendor/bin/gsp.sh --config=../../../{config}

Redirect {task} errors to a file:

sh vendor/bin/gsp.sh {task} 2> {task}.log

Options:

--install, -i - Installs Grunt dependencies

--install-nbl, -j - Installs Grunt dependencies (no bin links)

--update, -u - Updates Grunt dependencies

--config=<path> - Overrides config path

--disable=<task> - Disables listed tasks

--help, -h - Prints usage information

Bower

How to register GSP inside bower.json:

{
    "devDependencies":
    {
        "gsp": "2.4.6"
    }
}

Composer

How to register GSP inside composer.json:

{
    "require-dev":
    {
        "redaxmedia/gsp": "2.4.6"
    }
}

Troubleshooting

GSP needs third party libraries to work properly.

IMG:

optipng - Install using apt-get install optipng

libjpeg - Install using apt-get install libjpeg-progs

SASS:

ruby - Install using apt-get install ruby

rubygems - Install using apt-get install rubygems

sass - Install using gem install sass