This repository was archived by the owner on Dec 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
52 lines (45 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
scsslint: {
all: [
'sass/_partials/*.scss'
]
},
compass: {
dist: {
options: {
config: 'config.rb'
}
}
},
watch: {
options: {
livereload: true,
},
css: {
files: ['sass/**/*.scss'],
tasks: ['compass'],
},
},
shell: {
mirror: {
command: [
'ssh urn \'mysqldump -u readonlyuser wordpress > ~/wordpress-dump.sql\'',
'scp urn:~/wordpress-dump.sql /tmp/wordpress-dump.sql',
'mysql -u root -ppassword wordpress < /tmp/wordpress-dump.sql',
'mysql -u root -ppassword -e "UPDATE wordpress.wp_options SET option_value = \'${URNLOCAL}\' WHERE option_name = \'siteurl\' OR option_name= \'home\';"'
].join('&&')
},
options: {
stdout: true
}
}
});
grunt.loadNpmTasks('grunt-scss-lint');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-shell');
grunt.registerTask('default', ['scsslint', 'compass', 'watch']);
grunt.registerTask('mirror', ['shell:mirror']);
};