protected function generateScript($file, $input)
    {
        $script = <<<JS
var csscompressor = require('css-compressor');
var util = require('util');

var source = %s;
util.print(csscompressor.cssmin(source));

process.exit(0);
JS;
        file_put_contents($file, sprintf($script, json_encode($input)));
    }