Example #1
0
 /**
  * JS
  *
  * Either adds the javascript to the group, or returns the script tag.
  *
  * @access	public
  * @param	mixed	The file name, or an array files.
  * @param	array	An array of extra attributes
  * @param	string	The asset group name
  * $raw		bool	If set to true the result css tags will include the file contents directly instead of via a link tag.
  * $is_minify	bool	If set to true minify and combine files at only prod env.
  * @return	string
  */
 public static function js($stylesheets = array(), $attr = array(), $group = NULL, $raw = false, $is_minify = false, $is_use_minified_file = false)
 {
     if (Fuel::$env == Fuel::PRODUCTION) {
         if ($is_minify) {
             foreach ($stylesheets as $stylesheet) {
                 Casset::js($stylesheet, false, $group);
             }
             return;
         }
         if ($is_use_minified_file) {
             $stylesheets = Util_File::convert_filename2min($stylesheets);
         }
     }
     return parent::js($stylesheets, $attr, $group, $raw);
 }