public function render($file, $minified = false)
{
//attr
$attr = '';
if (count($this->attributes) > 0) {
foreach ($this->attributes as $name => $value) {
$attr .= ' ' . $name . '="' . $value . '"';
}
}
if ($minified && $this->minified !== null) {
$file = $this->minified;
}
// src
$tag = '<script src="' . $file . '"' . $attr . '></script>' . PHP_EOL;
// target
if ($this->target !== null) {
$targetTag = '<!--[if ' . $this->target . ']>';
if (stripos($this->target, 'gt') === 0) {
$targetTag .= '<!-->;';
}
$tag = $targetTag . $tag . '<![endif]-->';
}
return $tag;
}