forked from superdesk/superdesk-analytics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
54 lines (46 loc) · 1.39 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
var path = require('path');
module.exports = function(grunt) {
// util for grunt.template
grunt.toJSON = function(input) {
return JSON.stringify(input);
};
var config = {
pkg: grunt.file.readJSON(path.join(__dirname, 'package.json')),
tmpDir: '.tmp',
appDir: 'client',
distDir: 'dist',
specDir: 'spec',
tasksDir: 'tasks',
coreDir: __dirname,
poDir: 'po',
livereloadPort: 35729
};
grunt.initConfig(config);
require('load-grunt-tasks')(grunt, {
config: path.join(__dirname, 'package'),
pattern: [
'grunt-*',
'@*/grunt-*'
]
});
require('load-grunt-config')(grunt, {
config: config,
configPath: path.join(__dirname, 'tasks', 'options')
});
grunt.registerTask('hint', ['eslint']);
grunt.registerTask('test', ['ngtemplates:dev', 'karma:unit']);
grunt.registerTask('ci', ['test', 'hint']);
grunt.registerTask('ci:travis', ['ngtemplates:dev', 'karma:travis', 'hint']);
// Development server
grunt.registerTask('server', [
'clean',
'copy:index',
'copy:config',
'copy:locales',
'ngtemplates:gen-apps',
'ngtemplates:dev',
'webpack-dev-server:start'
]);
grunt.registerTask('package', ['ci', 'build']);
grunt.registerTask('default', ['server']);
};