-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgruntfile.js
33 lines (27 loc) · 961 Bytes
/
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
var modRewrite = require('connect-modrewrite');
module.exports = function(grunt){
grunt.option('force',true);
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
connect: {
env: {
options: {
hostname: '*',
port: 8080,
keepalive: true,
base: ['./app'],
directory: './app',
/* for angular APPs Only */
middleware: function (connect, options) {
var middlewares = [modRewrite(['^[^\\.]*$ /index.html [L]'])];
options.base.forEach(function (base) {
middlewares.push(connect.static(base))
});
return middlewares
}
}
}
}
});
grunt.loadNpmTasks("grunt-contrib-connect");
};