dev-master
9999999-devSymfony bundle that registers the codelovers/assetic-jshint filter
MIT
The Requires
- php >=5.3.0
- symfony/framework-bundle >=2.1
- kriswallsmith/assetic 1.1.*@dev
- codelovers/assetic-jshint dev-master
by Daniel Holzmann
Wallogit.com
2017 © Pedro Peláez
Symfony bundle that registers the codelovers/assetic-jshint filter
This Symfony 2 Bundle registers an Assetic filter to pass JavaScript files through JsHint on compilation., (*1)
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:, (*2)
// composer.json
"require": {
// ...
"codelovers/assetic-jshint": "dev-master",
"codelovers/assetic-jshint-bundle": "dev-master"
}
Then just add the bundle to your AppKernel.php file:, (*3)
<?php
// in AppKernel::registerBundles()
$bundles = array(
// ...
new CodeLovers\JsHintBundle\CodeLoversJsHintBundle(),
// ...
);
You will need to install JsHint to use this bundle. We assume you already have installed node.js:, (*4)
npm install -g jshint
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, (*5)
code_lovers_js_hint:
jshint_bin: ~
Simply apply the filter to your JavaScript assets:, (*6)
html+jinja
{% javascripts
'@AcmeDemoBundle/Resources/js/app.js'
filter='jshint' output='compiled/js/app.js' %} ... {% endjavascripts %}, (*7)
Symfony bundle that registers the codelovers/assetic-jshint filter
MIT