-
Notifications
You must be signed in to change notification settings - Fork 14
/
Gruntfile.js
63 lines (61 loc) · 1.25 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
chmod: {
options: {
mode: '777'
},
storage: {
src: [
'app/storage/cache',
'app/storage/logs',
'app/storage/meta',
'app/storage/sessions',
'app/storage/views',
]
}
},
less: {
main: {
options: {
paths: ['public/less']
},
files: {
'public/css/main.min.css': 'public/less/main.less'
}
}
},
uglify: {
options: {
sourceMap: true
},
app: {
files: {
'public/js/main.min.js': [
'public/js/main.js'
]
}
}
},
shell: {
install: {
command: [
'php artisan migrate --package=cartalyst/sentry',
'php artisan migrate',
'php artisan db:seed --class="InstallSeeder"'
].join(' && ')
},
seed: {
command: 'php artisan db:seed --class=DevelopmentSeeder'
}
}
});
grunt.loadNpmTasks('grunt-chmod');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.registerTask('install', ['chmod', 'shell:install']);
grunt.registerTask('seed', ['shell:seed']);
grunt.registerTask('build', ['less', 'uglify']);
grunt.registerTask('default', ['build']);
};