thanpolas / grunt-closure-tools

Google Closure Tools for grunt
MIT License
95 stars 22 forks source link

Different Compiler options for different builds #36

Closed aholla closed 11 years ago

aholla commented 11 years ago

Hi, how can i create two closureBuilder task with different compiler options. I want one task to build in a 'debug' mode and another to build in an 'advanced' mode. Can I specify them in a different build like bellow:


closureBuilder:  {

      options: {
           compilerOpts: {}
      }, 

      debug_build : {
              // different compiler options to those specified above
       },

       release_build : {
               // different compiler options to those specified above
       }

}

Thanks.

thanpolas commented 11 years ago

yes, exactly.

There is no way to augment the options.compilerOpts object of options in a Grunt way... You'll have to include the whole of your compilerOpts in each of the two targets

aholla commented 11 years ago

okay that is fine, so would that look like this:

closureBuilder:  {

      options: {
           compilerOpts: {}
      }, 

      debug_build : {
              compilerOpts: {}
              // different compiler options to those specified above
       },

       release_build : {
               compilerOpts: {}
               // different compiler options to those specified above
       }

}
thanpolas commented 11 years ago

yup, correct.

aholla commented 11 years ago

Thanks.