Use Elixir for compiling SCSS into CSS.

This commit is contained in:
James Brooks
2014-11-17 14:32:59 +00:00
parent e27fa2425f
commit 8562062fcb
11 changed files with 55 additions and 34 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
if ( ! function_exists('elixir'))
{
/**
* Get the path to a versioned Elixir file.
*
* @param string $file
* @return string
*/
function elixir($file)
{
static $manifest = null;
if (is_null($manifest))
{
$manifest = json_decode(file_get_contents(public_path().'/build/rev-manifest.json'), true);
}
if (isset($manifest[$file]))
{
return '/build/'.$manifest[$file];
}
throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
}
}