-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
49 lines (46 loc) · 1.3 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
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
eslint: {
target: ['src/*.js'],
options: {
config: '.eslintrc'
}
},
jscs: {
src: ['src/*.js'],
options: {
config: '.jscsrc'
}
},
'ftp-deploy': {
build: {
auth: {
host: 'ftp.pcextreme.nl',
port: 21,
authKey: 'gloey.nl'
},
src: 'dist',
dest: '/domains/gloey.nl/htdocs/www/apps/animationcontroller'
}
},
exec: {
clean: 'rm -rf ./dist',
build: 'webpack -p',
'build-debug': 'webpack -d',
'serve': 'webpack-dev-server -d --inline --reload=localhost',
'open-serve': 'open http://localhost:8080'
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-jscs');
grunt.loadNpmTasks('grunt-ftp-deploy');
grunt.loadNpmTasks('grunt-exec');
// Default task.
grunt.registerTask('default', ['eslint', 'jscs', 'exec:build-debug']);
grunt.registerTask('clean', ['exec:clean']);
grunt.registerTask('serve', ['eslint', 'jscs', 'exec:open-serve', 'exec:serve']);
grunt.registerTask('deploy', ['eslint', 'jscs', 'exec:clean', 'exec:build-debug', 'ftp-deploy']);
};