mpareja / paprika

Sprinkle JavaScript tasks on your .NET build.
5 stars 1 forks source link

Feature: allow specifying default configuration options #2

Closed mpareja closed 12 years ago

mpareja commented 12 years ago

You'll often want to use the same configuration settings across similar tasks. We should support specifying those common values once and only specifying the specifics for each task.

Here is a suggestion from @prabirshrestha:

var msbuild = require('paprika').msbuild;
msbuild.config({ version: 'net35', processor: 'x86', properties: { Configuration: 'Release' } });

task('build', function () {
    msbuild({
        file: '../MySolution.sln'
      , targets: ['Clean', 'Build']
      , show_stdout: false
    });
};
prabirshrestha commented 12 years ago

could you update the npm package. the latest on in npm doesn't seem to include msbuild.setDefaults({}) method.

mpareja commented 12 years ago

Done.

prabirshrestha commented 12 years ago

papriaka is now breaking.

$ jake
Invalid .NET framework version 'undefined' or processor 'x86'
jake aborted.

event without using setDefaults

task('build', function () {
    msbuild({
        file: path.join(rootpath, 'Source/AzureToolkit.sln'),
        targets: ['Build'],
        processor: 'x86',
        version: 'net40'
    });
});

undefined

mpareja commented 12 years ago

Sorry about that, where I am right now, I didn't have a quick environment for running an end-to-end test. I missed the version parameter when adding support for specifying default configurations.

I've pushed my changes and updated the npm package. Have a go and let me know.

prabirshrestha commented 12 years ago

works great now.

thanks for the fast responses.