Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4566524
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:48:04+00:00 2026-05-21T18:48:04+00:00

I’m looking into ways of minifying javascript files as part of our CI process,

  • 0

I’m looking into ways of minifying javascript files as part of our CI process, so that we can use the un-minified files in development and have them automatically compressed when deployed to staging and live servers.

This is for an ASP.NET site; we use Hudson as a build server.

I’m intrigued by the Google Closure compiler, and I’ve come across this .Net MSBuild Google Closure Compiler Task, but it doesn’t seem to be very widely used. Are there better options for use with MSBuild, using either Closure or alternative minification tools?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T18:48:05+00:00Added an answer on May 21, 2026 at 6:48 pm

    We’ve been using Closure Compiler for some time now in a .NET-based project.

    Initially, we used a simple MSBuild .proj file which directly invoked the Python scripts. For example, we would make deps.js with something like the following:

    <PropertyGroup>
      <ScriptDirectory>yourprojectname</ScriptDirectory>
      <ClosureLibrary>closure</ClosureLibrary>
      <CalcDeps>$(ClosureLibrary)\bin\calcdeps.py</CalcDeps>
    </PropertyGroup>
    
    <Target Name="Deps">
      <Exec Command="$(CalcDeps) -o deps -p $(ScriptDirectory) -d $(ClosureLibrary) --output_file=$(ScriptDirectory)\deps.js" />
    </Target>
    

    The actual build was more complex, but still relatively straightforward (assuming you’re MSBuild savvy). We simply used different types of item groups for each relevant part of the script invocation.

    <Target Name="Build" DependsOnTargets="Init;FindCompiler">
      <PropertyGroup Condition="'@(Extern)' != ''">
        <Externs>-f --externs=@(Extern, ' -f --externs=')</Externs>
      </PropertyGroup>
      <PropertyGroup Condition="'@(Define)' != ''">
        <Defines>-f --define=@(Define, ' -f --define=')</Defines>
      </PropertyGroup>
      <PropertyGroup Condition="'@(Compile)' != ''">
        <Compile>-i @(Compile, ' -i ')</Compile>
      </PropertyGroup>
      <Exec Command="$(CalcDeps) $(Compile) -o compiled -c $(ClosureCompiler) -p $(ClosureLibrary) -p $(ScriptDirectory) $(Externs) $(Defines) -f @(CompilerOption, ' -f ') --output_file $(OutputFile)" />
    </Target>
    

    This was simple enough that we didn’t bother looking for a task, or trying to invest in building our own. Closure is quite a fast moving project, so it’s good to be in a situation where you’re not overly dependent upon any third party build systems, especially one that looks to be unmaintained (the task you linked).

    Now, I’ve been speaking in past tense because our build system has migrated a bit. Specifically, as our project kept growing it became increasingly important to partition different parts of our script code into modules. Doing this with the out-of-the-box Closure scripts would be quite a nightmare. Thus, we decided to move to plovr (http://plovr.com/), which makes partitioning code into modules very simple. plovr is very actively maintained and was created by Michael Bolin, who literally wrote the book on Closure (also highly recommended).

    We still wrap this using the same MSBuild file. Basically, the stuff that we were defining in the item groups moves to a plovr-config.js file, and the invocation becomes much simpler as well:

    <Target Name="Build" DependsOnTargets="Init;FindPlovr">
      <Exec Command="$(Plovr) build plovr-config.js" />
    </Target>
    

    There are some other cool features supported by plovr, like size reports and module graphs, but even without those we’re very, very pleased with our current setup.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.