forked from Azure/azure-storage-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
100 lines (92 loc) · 3.15 KB
/
gruntfile.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
module.exports = function(grunt) {
//init stuff
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
mochaTest: {
test: {
options: {
reporter: 'spec',
quiet: false,
clearRequireCache: false,
timeout: 100000
},
src: ['test/**/*.js']
}
},
//jsdoc config
jsdoc: {
dist: {
src: [
'README.md',
'lib/azure-storage.js',
'lib/common/filters/retrypolicyfilter.js',
'lib/common/filters/linearretrypolicyfilter.js',
'lib/common/filters/exponentialretrypolicyfilter.js',
'lib/common/services/storageutilities.js',
'lib/services/blob/blobservice.js',
'lib/services/blob/models/blobresult.js',
'lib/services/blob/models/containerresult.js',
'lib/services/blob/models/leaseresult.js',
'lib/services/blob/blobutilities.js',
'lib/services/queue/queueservice.js',
'lib/services/queue/queuemessageencoder.js',
'lib/services/queue/queueutilities.js',
'lib/services/queue/models/queueresult.js',
'lib/services/queue/models/queuemessageresult.js',
'lib/services/table/tableservice.js',
'lib/services/table/tablebatch.js',
'lib/services/table/tablequery.js',
'lib/services/table/tableutilities.js',
'lib/services/file/fileservice.js',
'lib/services/file/fileutilities.js',
'lib/services/file/models/shareresult.js',
'lib/services/file/models/directoryresult.js',
'lib/services/file/models/fileresult.js',
'lib/common/services/storageserviceclient.js',
'lib/common/diagnostics/logger.js'
],
options: {
destination: 'docs',
template: 'node_modules/grunt-jsdoc/node_modules/ink-docstrap/template',
configure: 'jsdoc/jsdoc.json'
}
}
},
// devserver config
devserver: {
server : {},
options: {
'base': 'docs'
}
},
jshint: {
all: ['Gruntfile.js', 'lib/**/*.js'],
options: {
jshintrc: true
}
}
});
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-devserver');
grunt.loadNpmTasks('grunt-nsp-package');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('doc', ['jsdoc', 'devserver']);
grunt.registerTask('validate', ['jshint', 'validate-package']);
grunt.registerTask('default', ['validate', 'mochaTest']);
};