forked from gnosis/MultiSigWallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
126 lines (106 loc) · 3.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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
'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: 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",
// cache: <sec>,
showDir : true,
autoIndex: true,
// server default file extension
ext: "html"
},
ssl: {
// the server root directory
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",
// cache: <sec>,
showDir : true,
autoIndex: true,
// server default file extension
ext: "html",
// run in parallel with other tasks
// runInBackground: true|false,
// 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://someurl.com",
/// Use 'https: true' for default module SSL configuration
/// (default state is disabled)
https: {
cert: "localhost.crt",
key : "localhost.key"
},
//
// // Tell grunt task to open the browser
// openBrowser : false,
//
// // customize url to serve specific pages
// customPages: {
// "/readme": "README.md",
// "/readme.html": "README.html"
// }
}
},
ngtemplates: {
multiSigWeb: {
src: ['partials/**.html', 'partials/modals/**.html'],
dest: 'partials.js'
}
},
watch: {
scripts: {
files: ['partials/*.html', 'partials/modals/*.html'],
tasks: ['ngtemplates'],
options: {
livereload: true,
}
}
},
eslint: {
target: ['Gruntfile.js', 'controllers/**.js', 'services/**.js', '**.js']
},
'npm-command': {
certs: {
options: {
args: ["certs"],
cmd: "run"
}
}
}
});
grunt.registerTask('ssl-cert', function () {
if (!grunt.file.exists('./localhost.crt') && !grunt.file.exists('./localhost.key')) {
grunt.task.run(['npm-command']);
}
});
// Load the plugin that provides the http server.
grunt.loadNpmTasks('grunt-http-server');
grunt.loadNpmTasks('grunt-angular-templates');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-npm-command');
grunt.registerTask('default', ['ngtemplates', 'http-server']);
grunt.registerTask('ledger', ['ssl-cert', 'ngtemplates', 'http-server:ssl']);
};