-
Notifications
You must be signed in to change notification settings - Fork 5
/
Gruntfile.js
53 lines (50 loc) · 1.47 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
/*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/flex'
}
},
exec: {
'build': 'webpack -d',
'build-prod': 'webpack -p',
'open': 'open dist/index.html',
'clean': 'rm -rf ./dist',
'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']);
grunt.registerTask('prod', ['exec:clean', 'eslint', 'jscs', 'exec:build-prod']);
grunt.registerTask('open', ['exec:open']);
grunt.registerTask('clean', ['exec:clean']);
grunt.registerTask('serve', ['exec:open-serve', 'exec:serve']);
grunt.registerTask('open-serve', ['exec:open-serve']);
grunt.registerTask('deploy', ['eslint', 'jscs', 'exec:clean', 'exec:build', 'ftp-deploy']);
};