Merge pull request #84 from ONLYOFFICE/feature/json-minify
Add json minify task
This commit is contained in:
commit
1ed460fc1f
|
@ -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']);
|
||||
|
|
|
@ -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": [
|
||||
{
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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": [
|
||||
{
|
||||
|
|
|
@ -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": [
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue