On Aug 14, 7:37 pm, "Tane Piper" <[EMAIL PROTECTED]> wrote: > Absolutly, that worried me at first about rhino, but It's great to see > its already included. If anyone can work out how to included this in > eclipse as a runnable program to compress the code, please share it - > I tried myself, but I'm not familiar with its environment variables
Not for Eclipse, but here are my GNU Make rules to PACK/MIN/YUIMin my plugins: #!/do/not/make ######################################################################## # Common rules for JavaScript dirs. whnet.makefile.js := $(word $(words $(MAKEFILE_LIST)),$ (MAKEFILE_LIST)) $(whnet.makefile.js): whnet.jspack.php := $(toc2.top_srcdir)/computing/javascript/packer.php whnet.exec.jspack := $(whnet.bins.php) $(whnet.jspack.php) whnet.exec.jsmin := $(toc2.top_srcdir)/computing/javascript/jsmin $(whnet.exec.jsmin): $(whnet.exec.jsmin).c @gcc -o $@ $(whnet.exec.jsmin).c $(if $(whnet.bins.java),,$(eval error java binary not found in PATH)) whnet.exec.jsyuimin := $(whnet.bins.java) -jar $(toc2.top_srcdir)/ computing/javascript/yuicompressor-1.0.jar $(whnet.exec.jsyuimin): ######################################################################## # $(whnet.rules.js.eval.jspack) # Usage: $(eval $(call whnet.rules.js.eval.jspack,SOURCE_FILE)) # Strips the .js extension from SOURCE_FILE and creates rules for generating # SOURCE_FILE.pack.js and SOURCE_FILE.min.js define whnet.rules.js.eval.jspack ###### PACK rules: $(1): $(toc2.files.makefile) $(whnet.makefile.js) $(1).pack.js := $$(patsubst %.js,%.pack.js,$(1)) $$($(1).pack.js): $(1) @echo -n "PACKing $(1): "; $$(whnet.exec.jspack) < $(1) > $$@ @stat --printf "%s ==> " $(1); stat --printf "%s\n" $$@ jspack: $$($(1).pack.js) package.clean_files += $$($(1).pack.js) ###### MIN rules: $(1).min.js := $$(patsubst %.js,%.min.js,$(1)) $$($(1).min.js): $(1) $(whnet.exec.jsmin) @echo -n "MINing $(1): "; $$(whnet.exec.jsmin) < $(1) > $$@ @stat --printf "%s ==> " $(1); stat --printf "%s\n" $$@ jspack: $$($(1).min.js) package.clean_files += $$($(1).min.js) ###### YUIMIN rules: $(1).yuimin.js := $$(patsubst %.js,%.yuimin.js,$(1)) $$($(1).yuimin.js): $(1) $(whnet.exec.jsyuimin) @echo -n "YUI-MINing $(1): "; $$(whnet.exec.jsyuimin) -o $$@ $(1) >/ dev/null @stat --printf "%s ==> " $(1); stat --printf "%s\n" $$@ jspack: $$($(1).yuimin.js) package.clean_files += $$($(1).yuimin.js) endef whnet.rules.js.call.jspack = $(eval $(call whnet.rules.js.eval.jspack, $(1)))