forked from paulsjv/leansheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
49 lines (39 loc) · 1.56 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
module.exports = function(grunt) {
'use strict';
var httpPort = 8081,
locations = {
// Destination directory for compiled output. Relative to Gruntfile.js.
// dest: 'dist',
// Temporary work directory. Relative to Gruntfile.js.
// work: 'target',
// Raw sources root. Assumes child folder /js Relative to Gruntfile.js.
srcRoot: 'src',
// JS test root. Assumes child folder /js Relative to Gruntfile.js.
// testRoot: 'test',
// Bower root. Relative to Gruntfile.js.
bowerRoot: grunt.file.readJSON('.bowerrc').directory
};
// Define the configuration for all the tasks.
grunt.initConfig({
locations: locations,
httpPort: httpPort,
connect: {
dev: {
options: {
port: '<%= httpPort %>',
protocol: 'http',
hostname: '*',
base: '<%= locations.srcRoot %>',
keepalive: true,
open: false,
useAvailablePort: true
// middleware: function(connect, options, middlewares) {
// middlewares.unshift(require('grunt-connect-proxy/lib/utils').proxyRequest);
// return middlewares;
}
}
}
});
require('load-grunt-tasks')(grunt, { pattern: ['grunt-*'] }); //, '!grunt-template-*'] });
grunt.registerTask('run', [ 'connect' ]);
};