-
Notifications
You must be signed in to change notification settings - Fork 18
/
Gruntfile.js
47 lines (39 loc) · 1.28 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
/** Copyright 2015 Board of Trustees of University of Illinois
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// Creates the piwik server on PIWIK_PORT
var dotenv = require('dotenv');
dotenv.load();
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
const privateKey = fs.readFileSync('./cert/privkey.pem', 'utf8');
const certificate = fs.readFileSync('./cert/cert.pem', 'utf8');
const ca = fs.readFileSync('./cert/chain.pem', 'utf8');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
build: {
}
},
php: {
dist: {
options: {
key: privateKey,
cert: certificate,
ca: ca,
hostname: "0.0.0.0", //allows external networks to access
port: process.env.PIWIK_PORT,
keepalive: true,
base: './piwik'
}
},
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-php');
grunt.registerTask('default', ['php']);
}