Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit 7c68c30

Browse files
Added nuget to grunt
1 parent 3cfb15e commit 7c68c30

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Gruntfile.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = function (grunt) {
22

33
grunt.initConfig({
4+
pkg: grunt.file.readJSON('package.json'),
45
meta: {
56
banner:
67
'/*'+
@@ -52,6 +53,38 @@ module.exports = function (grunt) {
5253
grunt.loadNpmTasks('grunt-contrib-concat');
5354
grunt.loadNpmTasks('grunt-contrib-uglify');
5455
grunt.loadNpmTasks('grunt-contrib-qunit');
56+
grunt.loadNpmTasks('grunt-contrib-jshint');
57+
grunt.loadNpmTasks('grunt-contrib-watch');
58+
59+
grunt.registerTask('nuget', 'Register NuGet-RxJSjQuery', function () {
60+
var done = this.async();
61+
62+
//invoke nuget.exe
63+
grunt.util.spawn({
64+
cmd: ".nuget/nuget.exe",
65+
args: [
66+
//specify the .nuspec file
67+
"pack",
68+
"nuget/RxJS-Bridges-jQuery/RxJS-Bridges-jQuery.nuspec",
69+
70+
//specify where we want the package to be created
71+
"-OutputDirectory",
72+
"nuget",
73+
74+
//override the version with whatever is currently defined in package.json
75+
"-Version",
76+
grunt.config.get("pkg").version
77+
]
78+
}, function (error, result) {
79+
if (error) {
80+
grunt.log.error(error);
81+
} else {
82+
grunt.log.write(result);
83+
}
84+
85+
done();
86+
});
87+
});
5588

5689
// Default task(s).
5790
grunt.registerTask('default', ['concat:basic', 'uglify:basic', 'qunit']);

0 commit comments

Comments
 (0)