You are here

protected function RoboFile::writeComposerJsonFile in Panopoly 7

Writes a composer JSON file.

This tries to format the JSON in the way a composer.json would be, which may be prettier and/or more verbose than you'd format JSON for machines.

Parameters

string $filename: The file name to write.

array $data: The data to put in the file.

File

./RoboFile.php, line 190

Class

RoboFile
This is project's console commands configuration for Robo task runner.

Code

protected function writeComposerJsonFile($filename, $data) {
  file_put_contents($filename, json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
}