-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
85 lines (64 loc) · 2.08 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
// requires
var util = require('util');
var qx = require("../tool/grunt");
// grunt
module.exports = function(grunt) {
var config = {
generator_config: {
let: {
}
},
common: {
"APPLICATION" : "sn.boardfarm",
"QOOXDOO_PATH" : "..",
"LOCALES": ["en"],
"QXTHEME": "sn.boardfarm.theme.Theme"
},
'http-server': {
'dev': {
// the server root directory
root: ".",
// the server port
// can also be written as a function, e.g.
// port: function() { return 8282; }
port: 9999,
// 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: "127.0.0.1",
showDir : true,
autoIndex: true,
// server default file extension
ext: "html",
// specify a logger function. By default the requests are
// sent to stdout.
// logFn: function(req, res, error) {},
// Proxies all requests which can't be resolved locally to the given url
// Note this this will disable 'showDir'
// proxy: "http://mybackendserver.com",
// Tell grunt task to open the browser
openBrowser : true
}
}
/*
myTask: {
options: {},
myTarget: {
options: {}
}
}
*/
};
var mergedConf = qx.config.mergeConfig(config);
// console.log(util.inspect(mergedConf, false, null));
grunt.initConfig(mergedConf);
qx.task.registerTasks(grunt);
// // 3. Where we tell Grunt we plan to use this plug-in.
// grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-http-server');
// // 4. Where we tell Grunt what to do when we type "grunt" into the terminal.
// grunt.registerTask('default', ['concat']);
grunt.registerTask('source-server-nodejs', ['http-server:dev']);
// grunt.loadNpmTasks('grunt-my-plugin');
};