03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Deployment 99<br />

36<br />

37 $listener->onModify(function() use (<br />

38 $section,<br />

39 $output,<br />

40 $input,<br />

41 $file<br />

42 )<br />

43 {<br />

44 $this->build(<br />

45 $section,<br />

46 $output,<br />

47 $input,<br />

48 $file<br />

49 );<br />

50 });<br />

51 }<br />

52 }<br />

53 }<br />

54<br />

55 $watcher->startWatch();<br />

56 }<br />

57<br />

58 protected function build($section, $output, $input, $file)<br />

59 {<br />

60 $options = [<br />

61 "--output" => $output,<br />

62 "input" => join(",", $input)<br />

63 ];<br />

64<br />

65 $this->line(trim("<br />

66 Rebuilding<br />

67 " . $output . "<br />

68 after change to<br />

69 " . $file . "<br />

70 .<br />

71 "));<br />

72<br />

73 if (ends_with($output, ".min.css"))<br />

74 {<br />

75 $options["type"] = "css";<br />

76 $this->call("asset:minify", $options);<br />

77 }

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!