-
Notifications
You must be signed in to change notification settings - Fork 6
/
gulpfile.js
39 lines (34 loc) · 1.09 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var gulp = require('gulp'),
nuget = require('gulp-nuget'),
clean = require('gulp-clean'),
runSequence = require('run-sequence'),
project = require('./package.json'),
nugetApi = require('../nugetApi.json'),
nugetPath = '../nuget.exe';
gulp.task('nuget-pack', function() {
return gulp.src('./jQuery.jTableScroll.js')
.pipe(nuget.pack({
nuspec: 'project.nuspec',
nuget: nugetPath,
version: project.version,
workingDirectory: '.tmp/'
}))
.pipe(gulp.dest('nuget/'));
});
gulp.task('nuget-push', function() {
return gulp.src('nuget/jTableScroll.' + project.version + '.nupkg')
.pipe(nuget.push({
feed: 'https://www.nuget.org/',
nuget: nugetPath,
apiKey: nugetApi.key
}));
});
gulp.task('clean', function() {
return gulp.src(['./*.nupkg','.tmp/**']).pipe(clean());
});
gulp.task('clean-leftovers', function() {
return gulp.src(['./*.nupkg']).pipe(clean());
});
gulp.task('nuget', function() {
runSequence('clean','nuget-pack','clean-leftovers');
});