forked from web2solutions/csvViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
56 lines (45 loc) · 1.47 KB
/
Gruntfile.js
File metadata and controls
56 lines (45 loc) · 1.47 KB
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
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
, qunit: {
all: ['test/**/*.html']
}
, 'http-server': {
'dev': {
// the server root directory ... please change it
root: '.'
, // the server port
// can also be written as a function, e.g.
// port: function() { return 8282; }
port: 8282
, // the host ip address
// If specified to, for example, "127.0.0.1" the server will
// only be available on that ip.
// Specify "0.0.0.0" to be available everywhere
host: "0.0.0.0"
, // the server cache directory ... please change it
cache: '.'
, showDir: true
, autoIndex: true
, // server default file extension
ext: "html"
, // run in parallel with other tasks
runInBackground: false
, }
}
});
//grunt.loadNpmTasks('grunt-contrib-watch');
//grunt.loadNpmTasks('grunt-contrib-jshint');
//grunt.loadNpmTasks('grunt-mocha');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-http-server');
grunt.task.registerTask('qunittest', 'A sample task that run one test.', function(testname) {
if(!!testname)
grunt.config('qunit.all', ['test/' + testname + '.html']);
grunt.task.run('qunit:all');
});
grunt.registerTask('test', ['http-server:dev', 'qunittest']);
grunt.registerTask('livetest', ['http-server:dev']);
//grunt.registerTask('default', [ /*'readme'*/ ]);
};