Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 42 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | module.exports = function(grunt) { |
||
2 | grunt.initConfig({ |
||
3 | shell: { |
||
4 | rename: { |
||
5 | command: |
||
6 | 'cp pagantis.zip pagantis-$(git rev-parse --abbrev-ref HEAD).zip \n' |
||
7 | }, |
||
8 | composerProd: { |
||
9 | command: 'composer install --no-dev --ignore-platform-reqs' |
||
10 | }, |
||
11 | composerDev: { |
||
12 | command: 'composer install --ignore-platform-reqs' |
||
13 | }, |
||
14 | }, |
||
15 | compress: { |
||
16 | main: { |
||
17 | options: { |
||
18 | archive: 'pagantis.zip' |
||
19 | }, |
||
20 | files: [ |
||
21 | {src: ['assets/**'], dest: 'pagantis/', filter: 'isFile'}, |
||
22 | {src: ['controllers/**'], dest: 'pagantis/', filter: 'isFile'}, |
||
23 | {src: ['includes/**'], dest: 'pagantis/', filter: 'isFile'}, |
||
24 | {src: ['languages/**'], dest: 'pagantis/', filter: 'isFile'}, |
||
25 | {src: ['templates/**'], dest: 'pagantis/', filter: 'isFile'}, |
||
26 | {src: ['vendor/**'], dest: 'pagantis/', filter: 'isFile'}, |
||
27 | {src: 'WC_Pagantis.php', dest: 'pagantis/'}, |
||
28 | {src: 'readme.txt', dest: 'pagantis/'} |
||
29 | ] |
||
30 | } |
||
31 | } |
||
32 | }); |
||
33 | |||
34 | grunt.loadNpmTasks('grunt-shell'); |
||
35 | grunt.loadNpmTasks('grunt-contrib-compress'); |
||
36 | grunt.registerTask('default', [ |
||
37 | 'shell:composerProd', |
||
38 | 'compress', |
||
39 | 'shell:composerDev', |
||
40 | 'shell:rename' |
||
41 | ]); |
||
42 | }; |
||
43 |