forked from usgs/earthquake-gps
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
47 lines (39 loc) · 908 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
'use strict';
module.exports = function (grunt) {
var gruntConfig = require('./grunt');
// Load all tasks matching patterns ['grunt-*', '@*/grunt-*'] in package.json
require('load-grunt-tasks')(grunt);
grunt.initConfig(gruntConfig);
// Only lint the file that changed
grunt.event.on('watch', function (action, filepath) {
grunt.config('eslint.build.src', filepath);
});
grunt.registerTask('build', [
'clean:build',
'eslint',
'browserify',
'sass',
'postcss:build',
'copy:build',
'copy:c3',
'copy:d3',
'copy:dygraph',
'copy:leaflet',
'copy:leaflet_fullscreen',
'copy:simplbox',
'connect:template'
]);
grunt.registerTask('dist', [
'build',
'clean:dist',
'postcss:dist',
'uglify',
'copy:dist',
'connect:dist'
]);
grunt.registerTask('default', [
'build',
'connect:build',
'watch'
]);
};