Skip to content

Instantly share code, notes, and snippets.

@sirkirby
Last active August 29, 2015 13:56
Show Gist options
  • Save sirkirby/8926127 to your computer and use it in GitHub Desktop.
Save sirkirby/8926127 to your computer and use it in GitHub Desktop.
Automate nuget with grunt Ex 2
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ["dist"],
shell: {
makeDir: {
command: 'mkdir dist'
}
},
nugetpack: {
dist: {
src: 'src/*.nuspec',
dest: 'dist/'
}
},
nugetpush: {
dist: {
src: 'dist/*.nupkg'
}
}
});
// load contrib clean for prep
grunt.loadNpmTasks('grunt-contrib-clean');
// load the shell plugin for cmd goodies
grunt.loadNpmTasks('grunt-shell');
// Load the plugin that provides the "nuget" task.
grunt.loadNpmTasks('grunt-nuget');
// Default task(s).
grunt.registerTask('default', ['clean', 'shell', 'nugetpack']);
// Build and publish to nuget task
grunt.registerTask('publish', ['clean', 'shell', 'nugetpack', 'nugetpush']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment