This repository has been archived by the owner on Feb 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
75 lines (73 loc) · 2.43 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
module.exports = function(grunt) {
var path_srv = grunt.file.readJSON("path_srv.json");
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
style: 'compressed'
},
files: {
'app/views/template/css/style.css': 'app/views/template/css/style.scss',
'app/views/template/css/404.css': 'app/views/template/css/404.scss',
'admin/views/template/css/style.css': 'admin/views/template/css/style.scss',
}
}
},
//personnal use for ftp deploy to delete
'sftp-deploy': {
'one': {
auth: {
host: path_srv.server.dest.host,
port: 22,
authKey: 'key1'
},
src: path_srv.local.path,
dest: path_srv.server.dest.path,
exclusions: path_srv.exclusions,
serverSep: '/',
localSep: '/',
concurrency: 4,
progress: true
},
'ribs-server': {
auth: {
host: path_srv.server.dest.host,
port: 22,
authKey: 'key1'
},
src: path_srv.local.path_ribs_css,
dest: path_srv.server.dest.path_ribs_css,
serverSep: '/',
localSep: '/',
concurrency: 4,
progress: true
}
},
sync: {
main: {
files: [{
cwd: path_srv.local.path,
src: ['admin/**', 'core/**', 'libs/**', 'index.php', 'admin.php', 'config/initialise.php'],
dest: path_srv.local.path_bataille
}],
verbose: true, // Default: false
pretend: false, // Don't do any disk operations - just write log. Default: false
failOnError: true, // Fail the task when copying is not possible. Default: false
}
},
watch: {
styles: {
files: '**/*.scss', // tous les fichiers Sass de n'importe quel dossier
tasks: ['sass:dist']
},
css: {
files: "**/*.css",
tasks: ["sftp-deploy:ribs-server"]
}
}
});
grunt.registerTask('default', ['sass']);
};