dev-master
9999999-devJSHint filter for assetic
MIT
The Requires
The Development Requires
by Daniel Holzmann
Wallogit.com
2017 © Pedro Peláez
JSHint filter for assetic
JSHint filter for Assetic, (*1)
Most likely you will want to use this filter in a Symonfy 2 app. So we've created a bundle too :), (*2)
This filter will pass given assets through JsHint and throw an exception if any error has been found. To run it, you will need JsHint installed. Assuming you already have installed node.js, you can install JsHint easily:, (*3)
npm install -g jshint
The filter then only needs the path to the jshint binary as it's only constructor argument. Most likely it will be /usr/bin/jshint, which is the default value, or /usr/local/bin/jshint, (*4)
<?php
$filter = new JsHintFilter(); // if your jshint binary is in /usr/bin/jshint
$filter = new JsHintFilter("/path/to/jshint");
JSHint filter for assetic
MIT