-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
76 lines (75 loc) · 2.21 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
my_target: {
options: {
sourceMap: true,
preserveComments: 'some'
/*sourceMapName: 'path/to/sourcemap.map'*/
},
files: {
'processAndBuild/js/build/dest-min.js': ['processAndBuild/js/src/*.js'] // dest // output
// we need to remove all 3rd party scripts from my chris_sowerby.js and place them in a file called 3rd_party.js
}
}
},
sass: {
options: {
sourceMap: true,
outputStyle: 'compressed'
},
dist: {
files: { // Dictionary of files
'processAndBuild/stylesheets/style.css': 'processAndBuild/sass/style.scss' // 'destination': 'source'
}
}
},
ftpush: {
build: {
auth: {
host: '88.208.248.91',
port: 21,
authKey: 'key1'
},
src: './processAndBuild',
dest: 'httpdocs/processAndBuild', //httpdocs/themes/theme_by_chris_sowerby/processAndBuild
simple:true // stops bugs with ftpush 3rd party library.
}
},
notify_hooks: {
options: {
enabled: true,
max_js_hint_notifications: 5,
title: 'Cookiejar'
}
},
shell: {
reload: {
command: 'start reload-chrome.ahk'
}
},
notify: {
done: {
options: {
title: 'Tasks Done',
message: 'Refresh issued to chrome'
}
}
},
jshint: {
all: ['Gruntfile.js','processAndBuild/js/src/1_chris_sowerby.js'] //, 'processAndBuild/js/src/chris_sowerby.js' Gruntfile.js
},
watch:{
files: ['processAndBuild/**/*', '!**/node_modules/**'],
tasks:['jshint', 'newer:uglify', 'newer:sass:dist', 'ftpush', 'shell:reload', 'notify:done'] //'ftpush'
}
});
// load all grunt tasks matching the `grunt-*` pattern
require('load-grunt-tasks')(grunt);
// This is required if you use any options.
grunt.task.run('notify_hooks');
//require('time-grunt')(grunt);
grunt.registerTask('default', ['watch']);
};