Alfresco share supports compressed .js file. So is there anyway, whatever changes we make for example, in abc.js that automatically gets reflected into compressed file(abc-min.js) without using YUI compressor from command line.
I'm not sure your question makes sense - you want the -min.js version to be generated without the YUI Compressor? You can copy the uncompressed .js into -min.js (i.e. it doesn't have to be compressed) but that rather defeats the purpose.
Look at the ant targets "minimize-slingshot-javascript" and "minimize-slingshot-deployed-javascript"
"automatically gets reflected" - for that, I meant,some other file(may be makefile) that runs in background during deployment of webscript. so each time, we dont need to do it manually,
or the other thing,
component.head.inc - which puts .js to -min.js, if I dont include that file in the webScript, is it ok or it would defeats the purpose.
It depends what you're trying to achieve. If you're developing and want the browser to load the unminimised JavaScript, then set Share into debug mode by setting the client-debug flag to true (look in web-framework-config-application.xml).
Your other option is to change the <@script> tag into a <script> tag during development, which won't swap to the -min.js version at all.
What we use here is the "incremental-slingshot-tomcat-exploded" ant target, which copies the JavaScript across and then minimises it.