diff --git a/build/Gruntfile.js b/build/Gruntfile.js index a5e9b2649..bef9d497b 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -656,6 +656,49 @@ module.exports = function(grunt) { }); }); + grunt.registerTask('test-app-init', function() { + grunt.initConfig({ + pkg: packageFile, + + clean: { + options: { + force: true + }, + prebuild: packageFile['test']['clean']['prebuild'] + }, + + terser: { + options: { + format: { + comments: false, + preamble: copyright, + }, + }, + build: { + src: packageFile['test']['js']['src'], + dest: packageFile['test']['js']['dist'] + } + }, + + less: { + production: { + options: { + compress: true, + ieCompat: false + }, + files: { + "<%= pkg.test.less.files.dist %>": packageFile['test']['less']['files']['src'] + } + } + }, + + copy: { + 'index-page': { + files: packageFile['test']['copy']['index-page'] + } + } + }); + }); grunt.registerTask('increment-build', function() { var pkg = grunt.file.readJSON(defaultConfig); @@ -696,12 +739,13 @@ module.exports = function(grunt) { /*'replace:writeVersion', 'replace:fixResourceUrl'*/]); grunt.registerTask('deploy-app-embed', ['embed-app-init', 'clean:prebuild', 'terser', 'less', 'copy', 'clean:postbuild']); + grunt.registerTask('deploy-app-test', ['test-app-init', 'clean:prebuild', 'terser', 'less', 'copy']); doRegisterInitializeAppTask('common', 'Common', 'common.json'); doRegisterInitializeAppTask('documenteditor', 'DocumentEditor', 'documenteditor.json'); doRegisterInitializeAppTask('spreadsheeteditor', 'SpreadsheetEditor', 'spreadsheeteditor.json'); doRegisterInitializeAppTask('presentationeditor', 'PresentationEditor', 'presentationeditor.json'); - + doRegisterInitializeAppTask('testeditor', 'TestEditor', 'testeditor.json'); grunt.registerTask('deploy-app', 'Deploy application.', function(){ if (packageFile) { @@ -725,6 +769,8 @@ module.exports = function(grunt) { grunt.registerTask('deploy-spreadsheeteditor', ['deploy-common-component', 'deploy-spreadsheeteditor-component']); grunt.registerTask('deploy-presentationeditor', ['deploy-common-component', 'deploy-presentationeditor-component']); + grunt.registerTask('deploy-testeditor', ['init-build-testeditor', 'deploy-app']); + grunt.registerTask('default', ['deploy-common-component', 'deploy-documenteditor-component', 'deploy-spreadsheeteditor-component', diff --git a/build/documenteditor.json b/build/documenteditor.json index 44076fcab..af6d73319 100644 --- a/build/documenteditor.json +++ b/build/documenteditor.json @@ -364,34 +364,6 @@ ] } }, - "test": { - "clean": { - "prebuild": [ - "../deploy/web-apps/test/documenteditor/main" - ] - }, - "js": { - "src": [ - "../test/common/Gateway.js", - "../test/common/main/lib/util/utils.js", - "../test/documenteditor/main/js/ApplicationView.js", - "../test/documenteditor/main/js/ApplicationController.js", - "../test/documenteditor/main/js/application.js" - ], - "dist": "../deploy/web-apps/test/documenteditor/main/app-all.js" - }, - "less": { - "files": { - "src": "../test/documenteditor/main/resources/less/application.less", - "dist": "../deploy/web-apps/test/documenteditor/main/resources/css/app-all.css" - } - }, - "copy": { - "index-page": { - "../deploy/web-apps/test/documenteditor/main/index.html": "../test/documenteditor/main/index.html.deploy" - } - } - }, "tasks": { "deploy": [ "increment-build", diff --git a/build/testeditor.json b/build/testeditor.json new file mode 100644 index 000000000..6692de090 --- /dev/null +++ b/build/testeditor.json @@ -0,0 +1,41 @@ +{ + "name": "testeditor", + "version": "4.3.0", + "build": 1152, + "homepage": "http://www.onlyoffice.com", + "private": true, + "test": { + "clean": { + "prebuild": [ + "../deploy/web-apps/test/documenteditor/main" + ] + }, + "js": { + "src": [ + "../test/common/Gateway.js", + "../test/common/main/lib/util/utils.js", + "../test/documenteditor/main/js/ApplicationView.js", + "../test/documenteditor/main/js/ApplicationController.js", + "../test/documenteditor/main/js/application.js" + ], + "dist": "../deploy/web-apps/test/documenteditor/main/app-all.js" + }, + "less": { + "files": { + "src": "../test/documenteditor/main/resources/less/application.less", + "dist": "../deploy/web-apps/test/documenteditor/main/resources/css/app-all.css" + } + }, + "copy": { + "index-page": { + "../deploy/web-apps/test/documenteditor/main/index.html": "../test/documenteditor/main/index.html.deploy" + } + } + }, + "tasks": { + "deploy": [ + "increment-build", + "deploy-app-test" + ] + } +} \ No newline at end of file