Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

JsHintBundle

This Symfony 2 Bundle registers an Assetic filter to pass JavaScript files through JsHint on compilation.

Installation

Install the bundle using composer (see http://getcomposer.org/ for more information about composer) by adding it to your composer.json file and running composer update:

    // composer.json

    "require": {
        // ...
        "codelovers/assetic-jshint": "dev-master",
        "codelovers/assetic-jshint-bundle": "dev-master"
    }

Then just add the bundle to your AppKernel.php file:

<?php
// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new CodeLovers\JsHintBundle\CodeLoversJsHintBundle(),
    // ...
);

Install JsHint

You will need to install JsHint to use this bundle. We assume you already have installed node.js:

npm install -g jshint

Configuration

All you need to configure is the path to your jshint binary. Most likely it will be /usr/bin/jshint (that's the default value of the bundle's configuration) or /usr/local/bin/jshint

code_lovers_js_hint:
    jshint_bin: ~

Usage

Simply apply the filter to your JavaScript assets:

{% javascripts
 '@AcmeDemoBundle/Resources/js/app.js'
 filter='jshint' output='compiled/js/app.js' %} ... {% endjavascripts %}

About

Symfony bundle that registers a JsHint assetic filter

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.