greenlaw110 / greenscript

A tool help web developers manage javascript/css rendering, including minimize and dependence management
42 stars 24 forks source link

A suggestion on custom output name #42

Open jackysee opened 12 years ago

jackysee commented 12 years ago

I think a custom name would be useful to manage js output location.

e.g. In a main.html

<html>
<head>
           #{greenscript.js 'jquery < base', name:'head' /}
</head>
<body>
        #{doLayout /}
        #{greenscript.js name:'bottom' /}
 </body>
 </html>  

Then in somepage.html

#{extends 'main.html' /}

#{greenscript.js 'gallery' , name:'head' /}  
#{greenscript.js name:'head'}
       //Some other js I would like to concat to the head script
#{/greenscript.js}

#{greenscript.js 'libs/placeholder',  name:'bottom' /}

 <!-- content  start -->

Inline script or file with same name will be concatenated to one and the appear to the location in main.html