mς ι”ΤIc@sVdkZdkZdkZdZdZdfd„ƒYZd„Zdfd„ƒYZddd„Z e d joΰdk Z e i ei d d ƒ\Z Zyed ZWn*ej oeei d ƒe‚n.Xed Zepeei d ƒe‚ndZe o0e d d d joe d d ZdeGHne eeeƒndS(Ns.jss@requires:? (.*) t SourceFilecBs5tZdZd„Zd„ZededdƒZRS(s3 Represents a Javascript source code file. cCs||_||_g|_dS(s N(tfilepathtselftsourcet requiredBy(RRR((t../tools/mergejs.pyt__init__4s  cCstit|iƒS(sl Extracts the dependencies specified in the source code and returns a list of them. N(tretfindallt RE_REQUIRERR(R((Rt_getRequirements=stfgettdoct(t__name__t __module__t__doc__RR tpropertytrequires(((RR/s  cCs d|GHdS(s# Displays a usage message. s3%s [-c ] [...]N(tfilename(R((RtusageIstConfigcBstZdZd„ZRS(sΘ Represents a parsed configuration file. A configuration file should be of the following form: [first] 3rd/prototype.js core/application.js core/params.js # A comment [last] core/api.js # Another comment [exclude] 3rd/logger.js All headings are required. The files listed in the `first` section will be forced to load *before* all other files (in the order listed). The files in `last` section will be forced to load *after* all the other files (in the order listed). The files list in the `exclude` section will not be imported. Any text appearing after a # symbol indicates a comment. cCsτg}t|ƒD]J}|iƒo7|iƒidƒ o |tidd|ƒiƒqq~}||i dƒd|i dƒ!|_ ||i dƒd|i dƒ!|_ ||i dƒd|i dƒ!|_ ||i dƒd|_d S( sM Parses the content of the named file and stores the values. t#s#.*?$R s[first]is[last]s [include]s [exclude]N(t_[1]topenRtlinetstript startswithRtsubtlinestindexRt forceFirstt forceLasttincludetexclude(RRRRR((RRos d&&&(RRRR(((RRPs cCsšd}|ot|ƒ}ng}xϊti|ƒD]ι\}}}xΧ|D]Ο} | i t ƒoΉ| idƒ o¨tii|| ƒt|ƒd} | iddƒ} |o?|io5| |ijp| |ijo|i| ƒqq| p| |ijo|i| ƒqqIqIWq3Wddddd ddd }h}g}xZ|D]R} d | GHtii|| ƒiƒ}t|d ƒiƒ}t| |ƒ|| RRFRR=RRBR0R@R9RERLROR/RRARCR;R:((Rtrun}s !# "         W W     #t__main__is-c:is-csParsing configuration file: %s(RR,tsysR3R RRRR(RRRtgetopttargvtoptionstargsRPt IndexErrort SystemExitR.R*R(RXRRR.RRR*RPRTRR3R RURR,RW((Rt?(s2    -j