-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
42 lines (41 loc) · 1.48 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
module.exports = function(grunt) {
grunt.initConfig({
shell: {
rename: {
command:
'cp pagantis.zip pagantis-$(git rev-parse --abbrev-ref HEAD).zip \n'
},
composerProd: {
command: 'composer install --no-dev --ignore-platform-reqs'
},
composerDev: {
command: 'composer install --ignore-platform-reqs'
},
},
compress: {
main: {
options: {
archive: 'pagantis.zip'
},
files: [
{src: ['assets/**'], dest: 'pagantis/', filter: 'isFile'},
{src: ['controllers/**'], dest: 'pagantis/', filter: 'isFile'},
{src: ['includes/**'], dest: 'pagantis/', filter: 'isFile'},
{src: ['languages/**'], dest: 'pagantis/', filter: 'isFile'},
{src: ['templates/**'], dest: 'pagantis/', filter: 'isFile'},
{src: ['vendor/**'], dest: 'pagantis/', filter: 'isFile'},
{src: 'WC_Pagantis.php', dest: 'pagantis/'},
{src: 'readme.txt', dest: 'pagantis/'}
]
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.registerTask('default', [
'shell:composerProd',
'compress',
'shell:composerDev',
'shell:rename'
]);
};