-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
40 lines (37 loc) · 1.94 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
module.exports = function(grunt) {
var package = require('./package.json'),
options = package.options,
moduleName = options.moduleName;
grunt.initConfig({
compress: {
main: {
options: {
archive: moduleName + '.zip'
},
files: [
{src: ['controllers/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['classes/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['defaults/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['init/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['models/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['src/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['docs/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['override/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['logs/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['vendor/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['translations/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['upgrade/**'], dest: moduleName + '/', filter: 'isFile'},
{src: ['views/**'], dest: moduleName + '/', filter: 'isFile'},
{src: 'config.xml', dest: moduleName + '/'},
{src: 'index.php', dest: moduleName + '/'},
{src: moduleName + '.php', dest: moduleName + '/'},
{src: 'logo.png', dest: moduleName + '/'},
{src: 'LICENSE.md', dest: moduleName + '/'},
{src: 'README.md', dest: moduleName + '/'}
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.registerTask('default', ['compress']);
};