Merge pull request #84 from ONLYOFFICE/feature/json-minify

Add json minify task
This commit is contained in:
maxkadushkin 2018-04-09 18:00:21 +03:00 committed by GitHub
commit 1ed460fc1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 2 deletions

View file

@ -21,6 +21,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-json-minify');
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-mocha');
grunt.loadNpmTasks('grunt-inline');
@ -207,6 +208,12 @@ module.exports = function(grunt) {
}
},
'json-minify': {
build: {
files: packageFile['main']['jsonmin']['files']
}
},
copy: {
localization: {
files: packageFile['main']['copy']['localization']
@ -308,6 +315,12 @@ module.exports = function(grunt) {
}
},
'json-minify': {
build: {
files: packageFile['mobile']['jsonmin']['files']
}
},
copy: {
'template-backup': {
files: packageFile['mobile']['copy']['template-backup']
@ -423,12 +436,14 @@ module.exports = function(grunt) {
grunt.registerTask('deploy-requirejs', ['requirejs-init', 'clean', 'uglify']);
grunt.registerTask('deploy-app-main', ['main-app-init', 'clean:prebuild', 'imagemin', 'less', 'requirejs', 'concat',
'copy', 'svgmin', 'inline', 'replace:writeVersion', 'clean:postbuild']);
'copy', 'svgmin', 'inline', 'json-minify',
'replace:writeVersion', 'clean:postbuild']);
grunt.registerTask('deploy-app-mobile', ['mobile-app-init', 'clean:deploy', 'cssmin', 'copy:template-backup',
'htmlmin', 'requirejs', 'concat', 'copy:template-restore',
'clean:template-backup', 'copy:localization', 'copy:index-page',
'copy:images-app', 'replace:writeVersion', 'replace:fixResourceUrl']);
'copy:images-app', 'json-minify',
'replace:writeVersion', 'replace:fixResourceUrl']);
grunt.registerTask('deploy-app-embed', ['embed-app-init', 'clean:prebuild', 'uglify', 'less', 'copy',
'clean:postbuild']);

View file

@ -135,6 +135,9 @@
}
]
},
"jsonmin": {
"files": "../deploy/web-apps/apps/documenteditor/main/**/*.json"
},
"copy": {
"localization": [
{
@ -300,6 +303,9 @@
}
]
},
"jsonmin": {
"files": "../deploy/web-apps/apps/documenteditor/mobile/**/*.json"
},
"copy": {
"template-backup": [
{

View file

@ -21,6 +21,7 @@
"grunt-contrib-imagemin": "^1.0.0",
"grunt-contrib-cssmin": "^1.0.0",
"grunt-contrib-htmlmin": "^2.0.0",
"grunt-json-minify": "^1.1.0",
"vinyl-fs": "2.2.1",
"less-plugin-clean-css": "1.5.0",
"grunt-svgmin": "4.0.0",

View file

@ -135,6 +135,9 @@
}
]
},
"jsonmin": {
"files": "../deploy/web-apps/apps/presentationeditor/main/**/*.json"
},
"copy": {
"localization": [
{
@ -309,6 +312,9 @@
}
]
},
"jsonmin": {
"files": "../deploy/web-apps/apps/presentationeditor/mobile/**/*.json"
},
"copy": {
"template-backup": [
{

View file

@ -143,6 +143,9 @@
}
]
},
"jsonmin": {
"files": "../deploy/web-apps/apps/spreadsheeteditor/main/**/*.json"
},
"copy": {
"localization": [
{
@ -311,6 +314,9 @@
}
]
},
"jsonmin": {
"files": "../deploy/web-apps/apps/spreadsheeteditor/mobile/**/*.json"
},
"copy": {
"template-backup": [
{