-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
100 lines (90 loc) · 2.54 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
var pkg = require('./package.json');
var path = require('path');
module.exports = function(grunt) {
grunt.initConfig({
less: {
dashboard: {
options: {
compress: true,
cleancss: true,
yuicompress: true,
optimization: 2,
sourceMap : true,
strictImports :true,
plugins: [ ]
},
files: {
"public/css/dashboard.css": "seeVcam/static/apps/dashboard/dashboard.less"
}
},
interviewRoom: {
options: {
compress: true,
cleancss: true,
yuicompress: true,
optimization: 2,
sourceMap: true,
strictImports: true,
plugins: [ ]
},
files: {
"public/css/room.css": "seeVcam/static/apps/interview_room/interview_room.less"
}
}
},
requirejs: {
dashboard: {
options: {
baseUrl: "seeVcam/static/",
mainConfigFile: "./seeVcam/static/apps/dashboard/boot.js",
paths: {
requireLib: 'bower_components/requirejs/require'
},
name: "./apps/dashboard/boot",
out: "public/js/dashboard.min.js",
include: ["requireLib"]
}
},
interviewRoom: {
options: {
baseUrl: "seeVcam/static/",
mainConfigFile: "./seeVcam/static/apps/interview_room/boot.js",
paths: {
requireLib: 'bower_components/requirejs/require'
},
name: "./apps/interview_room/boot",
out: "public/js/room.min.js",
include: ["requireLib"]
}
}
},
shipit: {
options: {
workspace: '/tmp/seevcam_tmp',
deployTo: '/home/seevcam/app/seevcam',
repositoryUrl: '[email protected]:giuse88/seevcam.git',
branch:'master',
ignores: ['.git', 'node_modules'],
keepReleases: 5,
requirements:'staging.txt',
current:'/home/seevcam/app/seevcam/current'
},
// Staging environment.
staging: {
servers: ['[email protected]']
}
}
});
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-shipit');
grunt.loadTasks(path.join(__dirname, 'deploy/tasks'));
grunt.loadTasks(path.join(__dirname, 'deploy/global'));
// Task registration
grunt.shipit.on('published', function () {
grunt.task.run([
'npm_install', 'bower_install', 'minify', 'env_update',
'django_log_link', 'django_migrate','django_collectstatic',
'gunicorn_reload']);
});
};