{{ $main := resources.Get "js/main.js" }}
{{ with $main }}
{{ $js := . | resources.Minify }}
<script type="text/javascript" src="{{ $js.Permalink }}"></script>
{{ end }}