2014-06-13 02:05:59 +04:00
|
|
|
//
|
|
|
|
// 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({
|
2015-08-05 11:06:15 +03:00
|
|
|
|
2016-10-26 23:16:02 +03:00
|
|
|
nsp: {
|
|
|
|
package: grunt.file.readJSON('package.json')
|
|
|
|
},
|
2015-05-11 06:39:31 +03:00
|
|
|
|
|
|
|
mochaTest: {
|
|
|
|
test: {
|
|
|
|
options: {
|
|
|
|
reporter: 'spec',
|
|
|
|
quiet: false,
|
2015-06-08 05:10:43 +03:00
|
|
|
clearRequireCache: false,
|
|
|
|
timeout: 100000
|
2015-05-11 06:39:31 +03:00
|
|
|
},
|
|
|
|
src: ['test/**/*.js']
|
|
|
|
}
|
2014-06-13 02:05:59 +04:00
|
|
|
},
|
|
|
|
|
|
|
|
//jsdoc config
|
2015-05-11 06:39:31 +03:00
|
|
|
jsdoc: {
|
|
|
|
dist: {
|
|
|
|
src: [
|
2015-06-08 05:10:43 +03:00
|
|
|
'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',
|
2017-04-25 13:15:30 +03:00
|
|
|
'lib/services/blob/blobservice.core.js',
|
|
|
|
'lib/services/blob/blobservice.node.js',
|
|
|
|
'lib/services/blob/blobservice.browser.js',
|
2016-03-23 12:37:19 +03:00
|
|
|
'lib/services/blob/models/blobresult.js',
|
|
|
|
'lib/services/blob/models/containerresult.js',
|
|
|
|
'lib/services/blob/models/leaseresult.js',
|
2015-06-08 05:10:43 +03:00
|
|
|
'lib/services/blob/blobutilities.js',
|
|
|
|
'lib/services/queue/queueservice.js',
|
2016-05-06 04:55:37 +03:00
|
|
|
'lib/services/queue/queuemessageencoder.js',
|
2015-06-08 05:10:43 +03:00
|
|
|
'lib/services/queue/queueutilities.js',
|
2016-03-23 12:37:19 +03:00
|
|
|
'lib/services/queue/models/queueresult.js',
|
|
|
|
'lib/services/queue/models/queuemessageresult.js',
|
2015-06-08 05:10:43 +03:00
|
|
|
'lib/services/table/tableservice.js',
|
|
|
|
'lib/services/table/tablebatch.js',
|
|
|
|
'lib/services/table/tablequery.js',
|
|
|
|
'lib/services/table/tableutilities.js',
|
2017-04-25 13:15:30 +03:00
|
|
|
'lib/services/file/fileservice.core.js',
|
|
|
|
'lib/services/file/fileservice.node.js',
|
|
|
|
'lib/services/file/fileservice.browser.js',
|
2015-06-08 05:10:43 +03:00
|
|
|
'lib/services/file/fileutilities.js',
|
2016-03-23 12:37:19 +03:00
|
|
|
'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'
|
2015-05-11 06:39:31 +03:00
|
|
|
],
|
|
|
|
options: {
|
|
|
|
destination: 'docs',
|
2016-10-27 00:06:33 +03:00
|
|
|
template: 'node_modules/ink-docstrap/template',
|
2015-06-08 05:10:43 +03:00
|
|
|
configure: 'jsdoc/jsdoc.json'
|
2014-06-13 02:05:59 +04:00
|
|
|
}
|
2015-05-11 06:39:31 +03:00
|
|
|
}
|
2014-06-13 02:05:59 +04:00
|
|
|
},
|
2015-05-11 06:39:31 +03:00
|
|
|
|
|
|
|
// devserver config
|
|
|
|
devserver: {
|
|
|
|
server : {},
|
|
|
|
options: {
|
|
|
|
'base': 'docs'
|
2014-06-13 02:05:59 +04:00
|
|
|
}
|
2015-06-08 05:10:43 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
jshint: {
|
|
|
|
all: ['Gruntfile.js', 'lib/**/*.js'],
|
|
|
|
options: {
|
|
|
|
jshintrc: true
|
|
|
|
}
|
2014-06-13 02:05:59 +04:00
|
|
|
}
|
|
|
|
});
|
2015-05-11 06:39:31 +03:00
|
|
|
|
2014-06-13 02:05:59 +04:00
|
|
|
grunt.loadNpmTasks('grunt-jsdoc');
|
2015-05-11 06:39:31 +03:00
|
|
|
grunt.loadNpmTasks('grunt-mocha-test');
|
2014-06-13 02:05:59 +04:00
|
|
|
grunt.loadNpmTasks('grunt-devserver');
|
2016-10-26 23:16:02 +03:00
|
|
|
grunt.loadNpmTasks('grunt-nsp');
|
2015-06-08 05:10:43 +03:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
2014-06-13 02:05:59 +04:00
|
|
|
|
2015-05-11 06:39:31 +03:00
|
|
|
grunt.registerTask('doc', ['jsdoc', 'devserver']);
|
2016-10-26 23:16:02 +03:00
|
|
|
grunt.registerTask('validate', ['jshint', 'nsp']);
|
2015-06-08 05:10:43 +03:00
|
|
|
grunt.registerTask('default', ['validate', 'mochaTest']);
|
2015-05-11 06:39:31 +03:00
|
|
|
};
|