grunt compress

This commit is contained in:
Yuri Kuznetsov
2014-05-13 16:29:07 +03:00
parent 1c06883ce4
commit 03fc3d364e
2 changed files with 19 additions and 6 deletions
+15 -4
View File
@@ -146,7 +146,7 @@ module.exports = function (grunt) {
dot: true,
src: '**',
cwd: 'build/tmp',
dest: 'build/EspoCRM-<%= pkg.version %>/',
dest: 'build/EspoCRM-<%= pkg.espoVersion %>/',
},
},
replace: {
@@ -171,7 +171,7 @@ module.exports = function (grunt) {
patterns: [
{
match: 'version',
replacement: '<%= pkg.version %>'
replacement: '<%= pkg.espoVersion %>'
}
]
},
@@ -183,6 +183,17 @@ module.exports = function (grunt) {
]
}
},
compress: {
final: {
options: {
archive: 'build/EspoCRM-<%= pkg.espoVersion %>.zip',
mode: 'zip'
},
src: ['**'],
cwd: 'build/EspoCRM-<%= pkg.espoVersion %>',
dest: 'EspoCRM-<%= pkg.espoVersion %>'
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
@@ -192,6 +203,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-replace');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.registerTask('default', [
'clean:start',
@@ -202,12 +214,11 @@ module.exports = function (grunt) {
'copy:frontendFolders',
'copy:frontendHtml',
'copy:frontendLib',
//'copy:frontendLibSummernote',
//'copy:frontendLibFlotr2',
'copy:backend',
'replace',
'copy:final',
'clean:final',
'compress',
]);
};
+4 -2
View File
@@ -1,6 +1,7 @@
{
"name": "espocrm",
"version": "1.0-rc4",
"version": "1.0.0",
"espoVersion": "1.0-rc4",
"description": "",
"main": "index.php",
"repository": "",
@@ -15,6 +16,7 @@
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-cssmin": "~0.6.2",
"grunt-contrib-less": "~0.7.0",
"grunt-mkdir": "~0.1.1"
"grunt-mkdir": "~0.1.1",
"grunt-contrib-compress": "~0.8.0"
}
}