Google Closure Advanced Compilation Support

Jun 14, 2011 at 3:31 PM
Edited Jun 14, 2011 at 3:49 PM

Hey,

First off I just wanted to say great job so far, and I think you've established a great concept that has so much potential for integration into build processes.

</pleasantries>

 

That being said I am currently unable to use chirpy in my build configuration with its current set of options.  Google Closure support without the ability to send in all my files with the

"--manage_closure_dependencies true" flag (or its equivalent) hamstrings the utility of using the Closure compiler.  I would love to fork this project and make the requisite modifications for better closure support however I would like to test the waters on the feasibility of this before I waste my time...

In short:

Would it be possible to use a config file (example below) inside chirpy and have everything work as it should?  Or would it make a ton of breaking changes to the point where I would be better off either starting from scratch or continuing to use my batch files and build events...?

Edit: Also, there needs to be an "output" of the errors / warnings that are generated...

[file] chirpy.closure.config:

--------------------------------------------------

<closure>
 
	<compile>
		<output>outputfile.min.js</output>
		<compilation_level>ADVANCED_OPTIMIZATIONS</compilation_level>
		<summary_detail_level>3</summary_detail_level>
		<warning_level>VERBOSE</warning_level>
		<manage_closure_dependencies>true</manage_closure_dependencies>
		<output_wrapper>
			<![CDATA[(function(){%output%}());]]>
		</output_wrapper>
		
		<define>NAMESPACE.debug=false</define>
		<define>NAMESPACE.release=true</define>
 
		<file>../src/file1.js</file>
		<file>../src/file2.js</file>
		<folder>../src/lib1/</folder>
		<folder pattern="*.src.js" ignore="*.vsdoc.js">../src/lib2/</folder>
		
	</compile>
 
	<compile>
		<output>outputfile.debug.js</output>
		<compilation_level>WHITESPACE_ONLY</compilation_level>
		<formatting>PRETTY_PRINT</formatting>
		<formatting>PRINT_INPUT_DELIMITER</formatting>
		<manage_closure_dependencies>true</manage_closure_dependencies>
		<output_wrapper>
			<![CDATA[function _trace(x){window.console && console.log(x)}%output%]]>
		</output_wrapper>
 
		<define>NAMESPACE.debug=true</define>
		<define>NAMESPACE.release=false</define>
 
		<file>../src/file1.js</file>
		<file>../src/file2.js</file>
		<folder>../src/lib1/</folder>
		<folder pattern="*.src.js" ignore="*.vsdoc.js">../src/lib2/</folder>
 
	</compile>
 
</closure>

------------------------------------------

 

-- thanks for your time & sorry for the verbosity... -chris

Developer
Jun 15, 2011 at 1:54 AM

chirpy is not only for google closure compiler.

Curing xml structure : http://chirpy.codeplex.com/SourceControl/changeset/view/d3bcc18be9d3#Xml%2fChirpy.Config.xsd

Suggest :

New attribute (summary_detail_level,warning_level,manage_closure_dependencies,output_wrapper,define) in node

or

New attribute (custom_param_for_Google_compile)

 

"Edit: Also, there needs to be an "output" of the errors / warnings that are generated..."

In visual studio error/warning is show in output windows.

 

 

Developer
Jun 19, 2011 at 2:17 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Developer
Jun 24, 2011 at 11:14 PM

Test changeset : b4493adffd73